DateTimeDext extension

Extensions for DateTime

on

Methods

addTime({int day = 0, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0}) DateTime

Available on DateTime, provided by the DateTimeDext extension

Add time and return a new DateTime.
copyWith({int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) DateTime

Available on DateTime, provided by the DateTimeDext extension

CopyWith the DateTime with the year, month, day, hour, minute, second, millisecond, microsecond.
format(String formatText) String

Available on DateTime, provided by the DateTimeDext extension

Converts DateTime to format format.
isSameDay(DateTime other) bool

Available on DateTime, provided by the DateTimeDext extension

Check if the DateTime is in the same day as the other.
isSameMonth(DateTime other) bool

Available on DateTime, provided by the DateTimeDext extension

Check if the DateTime is in the same month as the other.
isSameWeek(DateTime other) bool

Available on DateTime, provided by the DateTimeDext extension

Check if the DateTime is in the same week as the other.
isSameYear(DateTime other) bool

Available on DateTime, provided by the DateTimeDext extension

Check if the DateTime is in the same year as the other.
simpleDate() String

Available on DateTime, provided by the DateTimeDext extension

Converts DateTime to yyyy-MM-dd format.
simpleDateTime() String

Available on DateTime, provided by the DateTimeDext extension

Converts DateTime to yyyy-MM-dd HH:mm:ss.
simpleTime() String

Available on DateTime, provided by the DateTimeDext extension

Converts DateTime to HH:mm:ss format.
subtractTime({int days = 0, int hours = 0, int minutes = 0, int second = 0, int milliseconds = 0, int microseconds = 0}) DateTime

Available on DateTime, provided by the DateTimeDext extension

Subtract time and return a new DateTime.
toZeroHour() DateTime

Available on DateTime, provided by the DateTimeDext extension

Converts DateTime to the zero time of the day.