new DateTime(opts)
Class for generate the fake data that you can use for
working with date and time.
Parameters:
Name |
Type |
Description |
opts |
object
|
Options
Properties
Name |
Type |
Attributes |
Default |
Description |
locale |
string
|
<optional>
|
en
|
Provider locale |
|
Methods
century()
Get a random value from list of centuries (roman format).
dayOfWeek(opts)
Get a random day of week.
Parameters:
Name |
Type |
Description |
opts |
object
|
Options
Properties
Name |
Type |
Attributes |
Default |
Description |
abbr |
boolean
|
<optional>
|
false
|
Abbreviated name of the day. |
|
month(opts)
Get a random month.
Parameters:
Name |
Type |
Description |
opts |
object
|
Options
Properties
Name |
Type |
Attributes |
Default |
Description |
abbr |
boolean
|
<optional>
|
false
|
if True then will be returned abbreviated month name. |
|
periodicity()
Get a random periodicity string.
year(opts)
Generate a random year.
Parameters:
Name |
Type |
Description |
opts |
object
|
Options
Properties
Name |
Type |
Attributes |
Default |
Description |
minimum |
number
|
<optional>
|
1990
|
Minimum value. |
maximum |
number
|
<optional>
|
2050
|
Maximum value |
|