rbardini / jsonresume-theme-even

A flat JSON Resume theme, compatible with the latest resume schema
https://jsonresume-theme-even.rbrd.in
MIT License
25 stars 31 forks source link

Day 1 of a month displays previous month #14

Closed technicat closed 2 years ago

technicat commented 2 years ago

When I export my json-resume to html using resume-cli with the built-in even theme, all of my dates that have a day 01 will display the previous month, e.g. a project state date of 2022-06-01 ends up in the html as May 2022, where as incrementing it 2022-06-02 will correctly result in June 2022.

This appears to be an artifact of the dateFormat helper in index.js calling toLocaleDateString, similar behavior described here

https://stackoverflow.com/questions/41432834/wrong-date-with-javascript-function-tolocaledatestring

I believe, as mentioned in the link above, adding this parameter to the toLocaleDateString options will fix it (I tested it in a small node script)

timeZone: "UTC"
rbardini commented 2 years ago

Thanks for the fix, @technicat! Released in v0.17.1.