DateHelper class

Constructors

DateHelper.new()

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 Properties

currentTime DateTime
no setter
dayHours Map<int, Map<String, Map<String, String>>>
no setter
firstDayOfYear DateTime
no setter
firstMinuteForToday DateTime
no setter
firstMonthDay DateTime
no setter
goSleepInitValue DateTime
no setter
lastDayOfYear DateTime
no setter
lastMinuteForToday DateTime
no setter
lastMonthDay DateTime
no setter
monthsOrder List<String>
no setter
now DateTime
Get current timestamp
no setter
today DateTime
no setter
todayAsIso8601 String
no setter
todayInDays int
Day of year
no setter
tomorrow DateTime
no setter
tomorrowMorning DateTime
no setter
wakeUpInitValue DateTime
no setter
weekDay String
Current week day
no setter
weekOfMonth int
Get number of week
no setter
yesterdayMidnight DateTime
no setter
yesterdayMidnightAsTimestamp int
no setter
yesterdayMorning DateTime
Yesterday
no setter
yesterdayMorningAsTimestamp int
no setter

Static Methods

compose({required dynamic date, required dynamic time, String? offset}) DateTime?
countDaysBetween(DateTime startDate, DateTime endDate) int
dateByWeekday(DateTime now, [int startDay = 1]) DateTime
firstMinuteFromDate(DateTime date) DateTime
formatDuration(String duration) String
getDaysInMonth<T>(int year, int month) List<T>
Get days by month
getDayTime(DateTime? dateTime, String defaultValue) String
Get Greating Time Period
getRandomTime({int? dayStart, int? dayEnd}) → (int, int)
Generate randome time from 8AM to 18PM
lastMinuteFromDate(DateTime date) DateTime
mergeDateTime({required DateTime date, required DateTime time}) DateTime
Merge to dates
toDate(dynamic date) DateTime?
Universal date transformer
weekendsCount(int year, int month) int
Get weekends count