This converts from a datetime to a day of week account for leap year. Also, adds todayDayOfWeek, yesterdayDayOfWeek, and tomorrowDayOfWeek. Originally, this work was at https://github.com/andrewthad/chronos/pull/49. This PR is the same thing but squashed and rebased for a cleaner git history.
This converts from a datetime to a day of week account for leap year. Also, adds todayDayOfWeek, yesterdayDayOfWeek, and tomorrowDayOfWeek. Originally, this work was at https://github.com/andrewthad/chronos/pull/49. This PR is the same thing but squashed and rebased for a cleaner git history.
Algorithm for datetime conversion adapted from: https://cs.uwaterloo.ca/~alopez-o/math-faq/node73.html
Algorithm for nanoseconds-since-epoch conversion adapted from: https://stackoverflow.com/q/36357013/1405768