Closed vresetnikov closed 1 year ago
I have just spotted the iso-month
setting, is this the answer? Why this separation? When are month-pad
and month-number
useful?
iso-month
is indicated in the documentation, however I don't think it is not listed in the Format
type:
export type Format =
| 'day'
| 'day-short'
| 'day-number'
| 'day-ordinal'
| 'day-pad'
| 'date'
| 'date-ordinal'
| 'date-pad'
| 'month'
| 'month-short'
| 'month-number'
| 'month-ordinal'
| 'month-pad'
| 'year'
| 'year-short'
| 'time'
| 'time-24'
| 'hour'
| 'hour-pad'
| 'hour-24'
| 'hour-24-pad'
| 'minute'
| 'minute-pad'
| 'second'
| 'second-pad'
| 'millisecond'
| 'ampm'
| 'quarter'
| 'season'
| 'era'
| 'timezone'
| 'offset'
| 'numeric'
| 'numeric-us'
| 'numeric-uk'
| 'mm/dd'
| 'iso'
| 'json'
| 'iso-short'
| 'iso-utc'
| 'nice'
| 'nice-year'
| 'nice-day'
| 'nice-full'
| string
hey Vladimir - yep, this sucks. Javascript uses 0-based months, and 1-based days. it was a design decision we went with early on. Your timing is good. I'm working on a breaking change, and may try to improve this but yes, for now, 'iso-month' or a rogue +1 should do the trick cheers
hey Vladimir - yep, this sucks. Javascript uses 0-based months, and 1-based days. it was a design decision we went with early on. Your timing is good. I'm working on a breaking change, and may try to improve this but yes, for now, 'iso-month' or a rogue +1 should do the trick cheers
Thank you very much for your continuous effort maintaining this awesome library
Hello,
Considering the following tests:
Why is it displaying the month number 9 (September) instead of 10 (October)? What is the correct way to achieve the 2022-10-01 format?
Thank you