EDateTime class

Class extension base DateTime

Constructors

EDateTime(int year, [int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0])
Default constructor
EDateTime.fromDateTime(DateTime date)
Constructor to convert DateTime to EDateTime
EDateTime.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch, {bool isUtc = false})
Constructs a new EDateTime instance with the given microsecondsSinceEpoch.
EDateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch, {bool isUtc = false})
Constructs a new EDateTime instance with the given millisecondsSinceEpoch.
EDateTime.now()
Constructs a EDateTime instance with current date and time in the local time zone.
EDateTime.utc(int year, [int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0])
Constructs a EDateTime instance specified in the UTC time zone.

Properties

day int
Get day from date
no setter
hashCode int
Returns hashCode
no setteroverride
hour int
Get hour from date
no setter
isUtc bool
Get isUtc
no setter
microsecond int
Get microsecond from date
no setter
microsecondsSinceEpoch int
Get microseconds Since Epoch
no setter
millisecond int
Get millisecond from date
no setter
millisecondsSinceEpoch int
Get day from milliseconds Since Epoch
no setter
minute int
Get minute from date
no setter
month int
Get month from date
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second int
Get second from date
no setter
timeZoneName String
Get timeZone from date
no setter
timeZoneOffset Duration
Get timeZoneOffset from date
no setter
weekday int
Get weekday from date
no setter
year int
Get year from date
no setter

Methods

add({int year = 0, int month = 0, int day = 0, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0}) EDateTime
Add a some value to current date,
compareTo(EDateTime other) int
Compares this EDateTime object to other, returning zero if the values are equal.
difference(EDateTime other) Duration
Difference between two EDateTime
isAfter(EDateTime other) bool
Returns true if this occurs after other.
isAtSameMomentAs(EDateTime other) bool
Returns true if this occurs at the same moment as other.
isBefore(EDateTime other) bool
Returns true if this occurs before other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subtract({int year = 0, int month = 0, int day = 0, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0}) EDateTime
toFormatStr(String? format) String
Convert EDateTime tyo format String. Use format from package intl
toIso8601String() String
Returns an ISO-8601 full-precision extended format representation.
toLocal() EDateTime
Returns this DateTime value in the local time zone.
toString() String
Convert EDateTime to String
override
toUtc() EDateTime
Returns this DateTime value in the UTC time zone.

Operators

operator -(EDateTime other) EDateTime
Allows you to subtract EDateTime between each other
operator <(EDateTime other) bool
Allows you to compare EDateTime with each other
operator <=(EDateTime other) bool
Allows you to compare EDateTime with each other
operator ==(Object other) bool
Allows you to compare EDateTime with each other
override
operator >(EDateTime other) bool
Allows you to compare EDateTime with each other
operator >=(EDateTime other) bool
Allows you to compare EDateTime with each other

Constants

april → const int
august → const int
daysPerWeek → const int
december → const int
february → const int
friday → const int
january → const int
Month constants that are returned by the month getter.
july → const int
june → const int
march → const int
may → const int
monday → const int
Weekday constants that are returned by weekday method:
monthsPerYear → const int
november → const int
october → const int
saturday → const int
september → const int
sunday → const int
thursday → const int
tuesday → const int
wednesday → const int