DateTimeExtension extension
- on
Methods
-
addMonths(
int count) → DateTime - This is to simulate C# behaviour. We guarantee the month will change to neighbour value and the day value is valid for that month.
-
addYears(
int count) → DateTime - This is to simulate C# behaviour. We guarantee the month will NOT change and the day value is valid for that month.
-
coerceIn(
{DateTime? min, DateTime? max}) → DateTime -
dayCountInThisMonth(
) → int -
formatToDTOString(
{bool useZForUTC = true}) → String -
formatToShortDateDisplay(
) → String -
formatToShortDateStorage(
) → String -
isSameDay(
DateTime other) → bool -
isToday(
) → bool -
timeZoneString(
{bool useZForUTC = true}) → String -
toDayTruncation(
) → DateTime -
tomorrow(
) → DateTime -
yesterday(
) → DateTime