DateHelper class

Constructors

DateHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addMonths(int months, {DateTime? toMonth}) DateTime
Returns a date with the specified months added or subtracted to the specified month.
calculateWeeksNumber(DateTime startDate, DateTime endDate) double
Calculate the max number of weeks in a date interval between monthStartDate and monthEndDate which have the same month.
getFirstDayOfMonth({DateTime? month}) DateTime
Returns a date with the same month and year of the specified date, and the first day of that month.
getFirstDayOfNextMonth({DateTime? month}) DateTime
Returns a date with the same month and year of the current date, and the first day of the current month.
getLastDayOfMonth({DateTime? month}) DateTime
Returns a date with the same month and year of the specified date, and the last day of that month.
retrieveDaysInMonth(DateTime month) int
Calculate the number of days in the specified month
retrieveWeekendDates({required DateTime inMonth}) List<int>
This method returns a list of int values representing the days of the specified inMonth that are in the weekend.