extensions/datetime_extension library

Extensions

FitDateTimeExtension on DateTime
Extension of the DateTime class.

Functions

getDayIndex(String day) int
Returns the index of a day throughout the week. The day input is expected to be from FitDateTimeExtension.getDate(). The index 0 is considered to be monday.
getToday() String
Returns the weekday of DateTime.now(). See FitDateTimeExtension.getDate().
getTodayIndex() int
Retourns the day index throughout the week of the current day. See getDayIndex().
getWeekDates() List<int>
Retourns the day numbers of the current week, from monday to sunday. Ex: 26, 27, 28, 29, 30, 31, 1.