Extract timestamp unit

GET https://postman-echo.com/time/unit?timestamp=2016-10-10&unit=day

A simple GET request to /time/unit to extract the specified timestamp unit (as provided in the unit query parameter). The default unit returned is the year.

This endpoint accepts timestamp, locale, format, and strict query parameters to construct the date time instance to check against.

Responses are provided in JSON format, with a unit key to indicate the result. The response code is 200 for valid query parameters, and 400 otherwise.

{
  unit: "extracted-timestamp-unit"
}

Request Params

KeyDatatypeRequiredDescription
timestampstring
unitstring