Date and time rules functions

Rules functions that work with dates and time.