DateTimeExtensions extension

on

Properties

datesOfMonths List<DateTime>
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.
no setter
firstDayOfWeek DateTime
no setter
formatted String
Gives formatted date in form of 'month - year'.
no setter
getTotalMinutes int
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
lastDayOfWeek DateTime
no setter

Methods

compareWithoutTime(DateTime date) bool
Compares only day, month and year of DateTime.
copyFromMinutes([int totalMinutes = 0]) DateTime
Returns a new DateTime object with hour and minutes calculated from totalMinutes.
datesOfWeek() List<DateTime>
Returns The List of date of Current Week Day will start from Monday to Sunday.
getDayDifference(DateTime date) int
Gets difference of days between date and calling object.
getMonthDifference(DateTime date) int
Gets difference of months between date and calling object.
getWeekDifference(DateTime date) int
Gets difference of weeks between date and calling object.
hasSameTimeAs(DateTime date) bool
Checks if time stamp of date is same as this. This method only checks hours and minutes.