Skip to main content

Update 4 Time for More Types

· 3 min read
Carl Sparks
One man band

It is time for a new content update! This update brings several new date/time based types. All the zone-based date/time formats support passing a specific time zone. The default timezone used is America/New_York if one is not provided.

A frantic bluejay observing a pocket watch AI Disclaimer: Image generated with ChatGPT 5.2

⏱️️ Zone-Based Date/Time Types

You can provide a specific time zone in square brackets. There are hundreds of supported timezones. For the complete list, check out the documentation page.

How to use it:

  1. Select one of the types identified below.
  2. (Optional) Reference your preferred timezone in the fields object using -[timeZone].
POST Body
{
"fields": {
"lastLogin_NY": "date-dash-ymdt",
"lastLogin_CHICAGO": "date-dash-ymdt-[America/Chicago]"
}
}
POST Response
{
"lastLogin_NY": "2026-01-15T19:32:31",
"lastLogin_CHICAGO": "2026-01-15T18:32:31"
}

New Types

date-iso-zoned - Returns an extended ISO-8601 string with zone information (i.e. "2026-01-14T19:13:06.492435-05:00[America/New_York]").

date-dash-mdy - Returns dash delimited date month, day, year format (i.e. "01-15-2026").

date-slash-mdy - Returns slash delimited date month, day, year format (i.e. "01/15/2026").

date-dash-mdyhm - Returns dash delimited date month, day, year, hour, minute format (i.e. "01-15-2026 18:48").

date-slash-mdyhm - Returns dash delimited date month, day, year, hour, minute format (i.e. "01/15/2026 18:48").

date-dash-mdyhms - Returns dash delimited date month, day, year, hour, minute, second format (i.e. "01-15-2026 18:48:40").

date-slash-mdyhms - Returns dash delimited date month, day, year, hour, minute, second format (i.e. "01/15/2026 18:48:40").

date-dash-ymdt - Returns dash delimited date year, month, day, and time format (i.e. "2026-01-15T18:48:40").

date-slash-ymdt - Returns dash delimited date year, month, day, and time format (i.e. "2026/01/15T18:48:40").

time - Returns the current time in 24-hour, minute, and second format (i.e. "18:48:40").

time-12hr - Returns the current time in 12-hour, minute, and second format (i.e. "05:48:40 PM").

year - Returns the current 4-digit year (i.e. 2026).

month - Returns the current 2-digit month (i.e. 01-12).

month-full - Returns the full text representation of the current month (i.e. "January").

month-short - Returns the shortened text representation of the current month (i.e. "JAN").

day - Returns the current 2-digit day (i.e. 15).

hour - Returns the current 2-digit hour from the 24-hour format (i.e. 18).

minute - Returns the current 2-digit minute (i.e. 48).

second - Returns the current 2-digit second (i.e. 30).

day-of-week - Returns the current text representation of the day of the week (i.e. "Thursday").


Until next time! Thank you for checking out the Mockd project. As always, if you have any feedback or feature requests, feel free to reach out.