Number Convert
This endpoint converts an abbreviated time value (e.g., 10s
for 10 seconds) into a readable full format. It supports conversions for seconds, minutes, hours, days, and weeks.
Endpoint
URL:
https://api.erensko.xyz/v1/number-convert
Method:
GET
Description: This endpoint converts a number with abbreviation like
1h
to a text readable format and more.
URL Parameters
Key
Value
abbreviation
The abbreviation you want to convert, a number followed by one of the following abbreviations: (s
, m
, h
, d
, or w
).
Headers
Key
Value
Authorization
Your own personal API key, create one by clicking here. This is required.
Request Example
GET https://api.erensko.xyz/v1/number-convert?abbreviation=1h
Example Response:
{
"result": "1 hour",
"secondsEquivalent": 3600,
"minutesEquivalent": 60,
"hoursEquivalent": 1,
"daysEquivalent": 0.041666666666666664,
"weeksEquivalent": 0.0059523809523809525,
"timeUnit": "h",
"unitInWords": "hours",
"timestampReference": "2024-11-08T10:12:34.567Z",
"unixTimeUntilNow": 1731087268,
"isoTimeUntilNow": "2024-11-08T11:12:34.567Z",
"discordFormat1": "<t:1731087268:f>",
"discordFormat2": "<t:1731087268:t>",
"discordFormat3": "<t:1731087268:d>",
"discordFormat4": "<t:1731087268:D>",
"discordFormat5": "<t:1731087268:t>",
"discordFormat6": "<t:1731087268:T>",
"discordFormat7": "<t:1731087268:R>"
}
Last updated