Sugar icon indicating copy to clipboard operation
Sugar copied to clipboard

More relative date terms

Open Earl-Brown opened this issue 7 years ago • 3 comments

I just encountered a situation where it would be nice to say new Date.range("since the first of the quarter").

.. and since we have "the first of the year" and "...month" it seems this would be a good one to add.

new Date("the first day of the quarter")
new Date("the start of the quarter")
new Date("the last day of the quarter")
new Date("the end of the quarter")

I'm sure there's more ... but you-all probably get the idea.

Earl-Brown avatar Jun 14 '17 19:06 Earl-Brown

That's a good idea, and (hopefully) would be a simple change. Let me look into it!

andrewplummer avatar Jun 17 '17 02:06 andrewplummer

Sure - thanks

Earl-Brown avatar Jun 19 '17 19:06 Earl-Brown

I'm just going to add a couple more suggestions here:

next quarter
next {month} e.g. 'next December' or 'next Jan'

Here are some more 'abstract' ones:

next season
next Autumn

And slightly less plausible/widely used:

in two quarters

scagood avatar Feb 28 '18 14:02 scagood