Function Friday - More Date and Time Fun: startOf and dayOf
Previously I’ve walked through how to do some date math, formatting, and parsing. Now I’ll drill into a few of the other date and time functions around getting certain values related to a particular date and time.
dayOf Functions There are three functions that are closely related: dayOfMonth, dayOfWeek, dayOfYear. All three function in the same manner. They return a numerical value that represents the particular DateTime’s value in reference to the current month, week, or year.