`OptionsWithTZ` type missing `useAdditionalDayOfYearTokens` and `useAdditionalWeekYearTokens` options
Closed this issue · 2 comments
paulrobertlloyd commented
The useAdditionalDayOfYearTokens
and useAdditionalWeekYearTokens
options are included in tests, but not included in typings.d.ts
:
Lines 30 to 42 in a92e0ad
From date-fns
documentation on Unicode Tokens:
...
format
andparse
functions won't accept these tokens withoutuseAdditionalDayOfYearTokens
option forD
andDD
anduseAdditionalWeekYearTokens
options forYY
andYYYY
:format(new Date(), 'D', { useAdditionalDayOfYearTokens: true }) //=> '283' parse('365+1987', 'DD+YYYY', new Date(), { useAdditionalDayOfYearTokens: true, useAdditionalWeekYearTokens: true }).toString() //=> 'Wed Dec 31 1986 00:00:00 GMT+0200 (EET)'
marnusw commented
This should be fixed in 3.1.0
which inherits the options types from date-fns
.
paulrobertlloyd commented
Yup, all reporting good and well now. Thanks for the fix!