DateTimeExtensions extension

on

Properties

formatted String

Available on DateTime, provided by the DateTimeExtensions extension

Gives formatted date in form of 'month - year'.
no setter
getTotalMinutes int

Available on DateTime, provided by the DateTimeExtensions extension

Returns total minutes this date is pointing at. if DateTime object is, DateTime(2021, 5, 13, 12, 4, 5) Then this getter will return 12*60 + 4 which evaluates to 724.
no setter
withoutTime DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Returns DateTime without timestamp.
no setter

Methods

compareWithoutTime(DateTime date) bool

Available on DateTime, provided by the DateTimeExtensions extension

Compares only day, month and year of DateTime.
copyFromMinutes([int totalMinutes = 0]) DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Returns a new DateTime object with hour and minutes calculated from totalMinutes.
datesOfMonths({WeekDays startDay = WeekDays.segunda}) List<DateTime>

Available on DateTime, provided by the DateTimeExtensions extension

Returns list of all dates of month. All the dates are week based that means it will return array of size 42 which will contain 6 weeks that is the maximum number of weeks a month can have.
datesOfWeek({WeekDays start = WeekDays.segunda}) List<DateTime>

Available on DateTime, provided by the DateTimeExtensions extension

Returns The List of date of Current Week Day will start from Monday to Sunday.
firstDayOfWeek({WeekDays start = WeekDays.segunda}) DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Returns the first date of week containing the current date
getDayDifference(DateTime date) int

Available on DateTime, provided by the DateTimeExtensions extension

Gets difference of days between date and calling object.
getMonthDifference(DateTime date) int

Available on DateTime, provided by the DateTimeExtensions extension

Gets difference of months between date and calling object.
getWeekDifference(DateTime date, {WeekDays start = WeekDays.segunda}) int

Available on DateTime, provided by the DateTimeExtensions extension

Gets difference of weeks between date and calling object.
hasSameTimeAs(DateTime other) bool

Available on DateTime, provided by the DateTimeExtensions extension

Compares time of two DateTime objects.
lastDayOfWeek({WeekDays start = WeekDays.segunda}) DateTime

Available on DateTime, provided by the DateTimeExtensions extension

Returns the last date of week containing the current date