date-fns
date-fns copied to clipboard
Format returns year -1 when formatting 1st of January
Found a funny bug..
console.log(format(new Date('2022-01-01'), 'RR-MM-dd'))
expected 2022-01-01
what I got
2021-01-01
Am I doing something wrong? If I am, it's very unintuitive. 😅
Thank you.