DateTimeExtensions extension
- on
Properties
- weekNumber → int
-
Available on DateTime, provided by the DateTimeExtensions extension
Gets the ISO 8601 week number from DateTime.no setter
Methods
-
age(
[DateTime? today]) → DateDuration -
Available on DateTime, provided by the DateTimeExtensions extension
Returns the age attoday
(or current time) for the date. -
dateToNextBirthday(
[DateTime? target]) → DateDuration -
Available on DateTime, provided by the DateTimeExtensions extension
Returns the period until the next year date attarget
(or current time) for a date. -
E(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat. -
format(
String format) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parses DateTime to String by passingformat
corresponding to the Intl DateFormat. -
HHmm(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat. -
HHmmss(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat. -
isThisDay(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrue
if the date is the same as a specificdateTime
or the current time. -
isThisHour(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrue
if the time is the same as a specificdateTime
or the current time. -
isThisMinute(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrue
if the minute is the same as a specificdateTime
or the current time. -
isThisMonth(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrue
if the month is the same as a specificdateTime
or the current time. -
isThisSecond(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrue
if the second is the same as a specificdateTime
or the current time. -
isThisYear(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrue
if the year is the same as a specificdateTime
or the current time. -
isToday(
[DateTime? dateTime]) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
-
toDate(
) → DateTime -
Available on DateTime, provided by the DateTimeExtensions extension
Create a new DateTime by extracting only the year and month from DateTime. -
toDateID(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Converts from DateTime to a String of the form20221223
. -
toDateTimeID(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Converts from DateTime to a String of the form20221223102331
. -
toUnUtc(
) → DateTime -
Available on DateTime, provided by the DateTimeExtensions extension
Treats DateTime, which is not defined as UTC due to parsing, as UTC and converts it to local time. -
yyyyMM(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat. -
yyyyMMdd(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat. -
yyyyMMddHHmm(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat. -
yyyyMMddHHmmss(
) → String -
Available on DateTime, provided by the DateTimeExtensions extension
Parse from DateTime to String corresponding to an Intl DateFormat.