DateConstants class

DateConstants is a utility class in Dart that provides static constants for commonly used dates. This class cannot be instantiated.

The unixEpochDate constant in this class represents the Unix epoch, which is the date and time that Unix systems use as the reference point for measuring time. The Unix epoch is defined as 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.

Example usage:

DateTime epoch = DateConstants.unixEpochDate;

Constructors

DateConstants.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

unixEpochDate DateTime
January 1st, 1970 is known as the Unix epoch. It is the date and time that Unix systems use as the reference point for measuring time. This date was chosen arbitrarily by early Unix engineers because they needed a uniform and convenient date for the start of time.
final