DateTimeExtensions extension

Provides extended methods for DateTime.

DateTime用の拡張メソッドを提供します。

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 at today (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 at target (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 passing format 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

Returns true if the date is the same as a specific dateTime or the current time.
isThisHour([DateTime? dateTime]) bool

Available on DateTime, provided by the DateTimeExtensions extension

Returns true if the time is the same as a specific dateTime or the current time.
isThisMinute([DateTime? dateTime]) bool

Available on DateTime, provided by the DateTimeExtensions extension

Returns true if the minute is the same as a specific dateTime or the current time.
isThisMonth([DateTime? dateTime]) bool

Available on DateTime, provided by the DateTimeExtensions extension

Returns true if the month is the same as a specific dateTime or the current time.
isThisSecond([DateTime? dateTime]) bool

Available on DateTime, provided by the DateTimeExtensions extension

Returns true if the second is the same as a specific dateTime or the current time.
isThisYear([DateTime? dateTime]) bool

Available on DateTime, provided by the DateTimeExtensions extension

Returns true if the year is the same as a specific dateTime 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 form 20221223.
toDateTimeID() String

Available on DateTime, provided by the DateTimeExtensions extension

Converts from DateTime to a String of the form 20221223102331.
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.