FakeMyJSON
  • FakeMyJSON - Documentation
  • Faker Formatters
    • Base
    • Lorem Ipsum Text
    • Person
    • Address
    • Phone Number
    • Company
    • Real Text
    • Date and Time
    • Internet
    • User Agent
    • Payment
    • Color
    • File
    • Image
    • Uuid
    • Barcode
    • Miscellaneous
  • Special Keys and Values
    • Special Keys
  • FakeMyJSON.io
  • Start generating random JSON!
Powered by GitBook
On this page
  • unixTime(maxTimestamp)
  • iso8601(maxTimestamp)
  • date(dateFormat, maxTimestamp)
  • time(maxTimestamp)
  • amPm(maxTimestamp)
  • dayOfMonth(maxTimestamp)
  • dayOfWeek(maxTimestamp)
  • month(maxTimestamp)
  • monthName(maxTimestamp)
  • year(maxTimestamp)
  • century
  • timezone

Was this helpful?

  1. Faker Formatters

Date and Time

unixTime(maxTimestamp)

Output Type: Integer

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "unixTime": "unixTime"
}
{
    "unixTime": 759094282
}

iso8601(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "iso8601": "iso8601"
}
{
    "iso8601": "1980-04-25T06:37:51+0000"
}

date(dateFormat, maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

dateFormat

String

"Y-m-d"

Any supported Date and Time Formats. Eg. "m.d.Y" | "m-d-Y" | "l jS \of F Y h:i:s A"

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "date": "date"
}
{
    "date": "2001-01-10"
}

time(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    	"time": "time"
}
{
    "time": "09:25:52"
}

amPm(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    	"amPm": "amPm"
}
{
    "amPm": "am"
}

dayOfMonth(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "dayOfMonth": "dayOfMonth"
}
{
     "dayOfMonth": "14"
}

dayOfWeek(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
     "dayOfWeek": "dayOfWeek",
}
{
    "dayOfWeek": "Saturday"
}

month(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "month": "month"
}
{
    "month": "07"
}

monthName(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "monthName": "monthName"
}
{
    "monthName": "January"
}

year(maxTimestamp)

Output Type: String

Argument

Type

Default

Valid Values

maxTimestamp

String

"now"

Any supported Date and Time Formats. Eg: '2008-04-25 08:37:17' | 'yesterday' | 'thursday' | '+5 weeks'

{
    "year": "year"
}
{
     "year": "1998"
}

century

Output Type: String

{
    "century": "century"
}
{
    "century": "XX",
}

timezone

Output Type: String

{
    "timezone": "timezone"
}
{
    "timezone": "Atlantic/Canary"
}

PreviousReal TextNextInternet

Last updated 4 years ago

Was this helpful?