functions/dates library

Functions

endOfDay(DateTime date) DateTime
Returns the end of the day. params DateTime date The date to get the end of the day. returns DateTime The end of the day.
getDateTimeFromOffset(double offset, double hourHeight, DateTime date) DateTime
Returns the date time from the offset of the scroll. Used to access time when creating new events by drag selection. params double offset The offset of the scroll. params DateTime date for the position selected.
isDateToday(DateTime date) bool
Returns true if the date is today. params DateTime The date to check.
isEventBeforeToday(Event event) bool
Returns true if the event is before today. params Event The event to check. returns bool True if the event is before today.
isEventPast(Event event) bool
Returns true if the event is in the past (i.e. the end date is before the current date). params Event The event to check. returns bool True if the event is in the past.
isSameDate(DateTime date1, DateTime date2) bool
Returns true if the two dates are the same. params DateTime The first date. params DateTime The second date.
roundUpQuarter(DateTime date) DateTime
Rounds down time to the nearest quarter. params DateTime date The date to round. returns DateTime The rounded date.
startOfDay(DateTime date) DateTime
Returns the start of the day. params DateTime date The date to get the start of the day. returns DateTime The start of the day.