Date class
Provides data related to date and time.
Constructors
Properties
- century → String
-
Returns a random century.
no setter
- dayOfMonth → int
-
Returns a random day of the month, from 1 to 31.
no setter
- formattedTime → String
-
Returns a random time formatted for locale.
no setter
- gmtOffset → String
-
Returns a random GMT offset value.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → Locale
-
final
- periodicity → String
-
Returns a random periodicity string.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seed → int?
-
final
- time → String
-
Returns a random time.
no setter
Methods
-
date(
{int start = 2000, int? end}) → String - Returns random date in the YYYY-MM-DD format.
-
dateTime(
{int? start, int? end}) → DateTime - Returns a random DateTime.
-
dayOfWeek(
{bool isAbbr = false}) → String - Returns day of the week.
-
formattedDate(
{int start = 2000, int? end}) → String - Returns random date formatted for locale.
-
month(
{bool isAbbr = false}) → String - Returns a random month of the year.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
timezone(
{TimezoneRegion? region}) → String - Returns a random timezone.
-
toString(
) → String -
A string representation of this object.
inherited
-
weekDate(
{int start = 2017, int? end}) → String - Returns a random week number with year.
-
year(
{int min = 1990, int? max}) → int - Returns a random year.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited