Library fails for the basic case dateFormat("2022-11-10", "mmm dd")
justin-barca-at-camis opened this issue · 3 comments
justin-barca-at-camis commented
Even a datestring with no time or timezone info is rendered incorrectly, date is offset.
See: https://codesandbox.io/s/naughty-lederberg-8dri33?file=/src/index.js
In the console I see "Nov 09"
pkuprys commented
most likely because of the UTC offset in the Date object, see https://stackoverflow.com/questions/28344408/why-does-js-subtract-a-day-from-a-date-object-with-a-certain-format
chase-manning commented
Even a datestring with no time or timezone info is rendered incorrectly, date is offset.
See: https://codesandbox.io/s/naughty-lederberg-8dri33?file=/src/index.js
In the console I see "Nov 09"
I think the first input should be a date not a string. Try put a date into it. dateFormat(new Date(), "mmm dd");
chase-manning commented
Closing due to inactivity.