Added isTomorrow helper function for future humanize 'today' dates. Also, I noticed that the tests failed, locally even when I switched to master. After debugging, I figured out it was because 2020 was a leap year. Hence, I updated the tests to work properly with leap year.
In addition, I added isLeapYear helper function to identify if a year is a leap year.
Question should how should the TimeUnit handle leap years?
Added
isTomorrow
helper function for future humanize 'today' dates. Also, I noticed that the tests failed, locally even when I switched to master. After debugging, I figured out it was because 2020 was a leap year. Hence, I updated the tests to work properly with leap year.In addition, I added
isLeapYear
helper function to identify if a year is a leap year.Question should how should the TimeUnit handle leap years?
https://github.com/Shopify/javascript-utilities/blob/80890c67d8052b5a1c2656921780a74b0ed72042/src/dates.ts#L32