FitDateTimeExtension extension

Extension of the DateTime class.

on

Methods

getDate() String

Available on DateTime, provided by the FitDateTimeExtension extension

Retourns the weekday of a DateTime. Ex: monday, tuesday, wednesday, etc.
getOrdinal() String

Available on DateTime, provided by the FitDateTimeExtension extension

Returns the ordinal day number. Ex. 11th, 1st, 2nd, etc.
getWeekNumber() int

Available on DateTime, provided by the FitDateTimeExtension extension

Returns the week number of the current week. from 1 to 52.
isSameDate(DateTime other) bool

Available on DateTime, provided by the FitDateTimeExtension extension

Returns true if two DateTime are on the same exact day (Day, month and year).
isToday() bool

Available on DateTime, provided by the FitDateTimeExtension extension

Returns true if DateTime.now() is on the same exact day as this. See isSameDate.
isTomorrow() bool

Available on DateTime, provided by the FitDateTimeExtension extension

Returns true if a DateTime corresponds to tomorrow (Same year and day + 1).
isYesterday() bool

Available on DateTime, provided by the FitDateTimeExtension extension

Returns true if a DateTime corresponds to yesterday (Same year and day - 1).
prettyPrint() String

Available on DateTime, provided by the FitDateTimeExtension extension

Prints a DateTime with the format {yyyy/mm/dd}.
printTime() String

Available on DateTime, provided by the FitDateTimeExtension extension

Prints a DateTime with the format {hh}h{mm}. Ex: 13h50, 2h10, 10h05.