Time
Module to generate time of dates in various formats.
Recent
Deprecated
This method is deprecated and will be removed in a future version.
Returns recent time.
Parameters
Name | Type | Default | Description |
---|---|---|---|
format | 'abbr' | 'date' | 'unix' | 'wide' | string | 'unix' | The format to use.
|
Returns: Date | number | string
faker.time.recent(format: 'abbr' | 'date' | 'unix' | 'wide' | string = 'unix'): string | number | Date
faker.time.recent() // => 1725581137872
faker.time.recent() // 1643067231856
faker.time.recent('abbr') // '12:34:07 AM'
faker.time.recent('date') // 2022-03-01T20:35:47.402Z
faker.time.recent('wide') // '00:34:11 GMT+0100 (Central European Standard Time)'
faker.time.recent('unix') // 1643067231856