MsDateTimeExtensions extension
- on
Methods
-
copyWith(
{int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) → DateTime - Return a new instance of DateTime with new values
-
fromInternet(
{String? timeZoneName}) → Future< DateTime> -
Get current DateTime from internet
timeZoneName
Set a timezone. Use Timezones if null will return a timezone from public client ip -
isAtSameDay(
DateTime other) → bool -
Return true if
other
is happened on the same day -
isAtSameHour(
DateTime other) → bool -
Return true if
other
is happened on the same hour -
isAtSameMinute(
DateTime other) → bool -
Return true if
other
is happened on the same minute -
isAtSameMonth(
DateTime other) → bool -
Return true if
other
is happened on the same month -
isAtSameSecond(
DateTime other) → bool -
Return true if
other
is happened on the same second -
isAtSameYear(
DateTime other) → bool -
Return true if
other
is happened on the same year -
isAtToday(
) → bool - Return true if this instance happened at today
-
nextDayOfTheWeek(
int weekday) → DateTime - Return a new instance DateTime with next weekday
-
nextWeekday(
int weekday) → DateTime - Return a new instance DateTime with next weekday
-
previousDayOfTheWeek(
int weekday) → DateTime - Return a new instance DateTime with previous day of the week