NASA-IMPACT / csdap-cumulus

SmallSat Cumulus Deployment
Other
1 stars 1 forks source link

Allow `D` for unpadded day of year in date format #181

Closed chuckwondo closed 1 year ago

chuckwondo commented 1 year ago

Fixes the following error when attempting to format dates using a single D to represent the unpadded day of year:

RangeError: Use `d` instead of `D` (in `D`) for formatting days of the month to the input `Sat Aug 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time)`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
    at throwProtectedError (/work/node_modules/date-fns/_lib/protectedTokens/index.js:26:11)
    at /work/node_modules/date-fns/format/index.js:415:41
    at Array.map (<anonymous>)
    at Object.format (/work/node_modules/date-fns/format/index.js:395:45)