DateTimeFormatter extension
Extension on DateTime.
- on
Properties
- endOfMonth → DateTime
-
Returns the last day of the month in this DateTime.
no setter
- getWeekday → int
-
Gets weekday from DateTime where sunday is 0 and saturday is 6
no setter
- startOfMonth → DateTime
-
Returns the first day of the month of this DateTime.
no setter
- toMidnight → DateTime
-
Returns date at 00:00:00
no setter
- weekNumberOfYear → int
-
Gets the week number within a year.
no setter
Methods
-
format(
[String template = 'MM/dd/yyyy KK:mm a', String locale = 'en_US']) → String -
Applies a
DateFormat
to this DateTime. -
getFirstDayOfWeek(
{int weekStartDay = 0}) → DateTime - Gets first day of week.
-
getLastDayOfWeek(
{int weekStartDay = 0}) → DateTime - Gets last day of week.
-
getWeeksNumbersInMonth(
StartingDayOfWeek startingDayOfWeek, DateTime focusedDay) → List< int> - Gets the week numbers for a month
-
isSameDay(
DateTime input) → bool - Returns true if the input DateTimes are on the same day, ignoring the time.