Utils for working with dates.
Given a month, return the next month.
getNextMonth Apr == MayGiven a month, return the previous month.
getPrevMonth Apr == MayConvert the month to a number in the range [0, 11]
Convert the month to a number in the range [1, 12]
Given a number from 0 to 11, convert it to the corresponding month.
Return the number of days in a month.
numberOfDaysInMonth 2018 Feb == 28
numberOfDaysInMonth 2016 Feb == 29Given a Time, return the Weekday
Given a Weekday, get the next weekday.
getNextWeekday Sun == Mon
Given a Weekday, get the previous weekday.
getPrevWeekday Sun == Sat
Convert the Weekday to a number representation. Starts with 0 on Monday.
weekdayToNumber Mon == 0
weekdayToNumber Sun == 6Convert a number to a weekday. 0 is for Monday.
weekdayFromNumber 0 == Just Mon
weekdayFromNumber 6 == Just Sun
weekdayFromNumber 8 == NothingGet the difference in days between two weekdays. Assume always forward direction. For example, the returned value from Friday to Wednesday is 5.
weekdayDiff Fri Wed == 5
weekdayDiff Mon Wed == 2Get the difference in days between two weekdays. It works in the backwards direction. For example, the returned value from Friday to Wednesday is 2.
weekdayDiffBack Fri Wed == 2
weekdayDiffBack Mon Wed == 5Given a datetime, set the time to 00:00:00.000
Get the iso format of the date
If the year is a leap year, return True. False otherwise.