DateTimeUtil class
Utility functions for DateTime
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
-
daysInMonth(
int monthNum, int year) → int? -
Get number of
days
frommonth
. -
getDayListOfMonth(
DateTime date) → List< DateTime> - Get days list of a month.
-
isLeapYear(
int year) → bool -
Check the
year
isleap
year or not. -
noOfDaysInMonth(
{DateTime? date}) → int - Get number of day from a date.
-
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
-
findFirstDateOfNextWeek(
DateTime dateTime) → DateTime -
Find first date of next week using a date in current week.
dateTime
A date in current week. -
findFirstDateOfPreviousMonth(
DateTime dateTime) → DateTime - Find first date of previous month from a date.
-
findFirstDateOfPreviousWeek(
DateTime dateTime) → DateTime -
Find first date of previous week using a date in current week.
dateTime
A date in current week. -
findFirstDateOfTheMonth(
DateTime dateTime) → DateTime - Find first date of month from a date.
-
findFirstDateOfTheWeek(
DateTime dateTime) → DateTime - Find the first date of the week which contains the provided date.
-
findLastDateOfNextWeek(
DateTime dateTime) → DateTime -
Find last date of next week using a date in current week.
dateTime
A date in current week. -
findLastDateOfPreviousMonth(
DateTime dateTime) → DateTime - Find last date of previous month from a date.
-
findLastDateOfPreviousWeek(
DateTime dateTime) → DateTime -
Find last date of previous week using a date in current week.
dateTime
A date in current week. -
findLastDateOfTheMonth(
DateTime dateTime) → DateTime - Find last date of month from a date.
-
findLastDateOfTheWeek(
DateTime dateTime) → DateTime - Find last date of the week which contains provided date.
-
getFormattedDateString(
DateTime date, {String pattern = 'dd-MM-yyyy'}) → String -
Convert
date
to String according topattern
. -
getLastMonth(
DateTime dateTime) → DateTime - Get last month from a date.