Twinkle HubTwinkle Hub

Humanize duration

tw_duration_humanize

More tools · same family🇹🇼 Taiwanread-only

秒數 → 人類可讀(中文/英文)。例: 7325 → "2 小時 2 分鐘 5 秒" / "2h 2m 5s"。

Parameters

ParamTypeDescription
seconds *number—
language"zh-tw" | "en"—
Raw JSON schema
{
  "properties": {
    "seconds": {
      "title": "Seconds",
      "type": "number"
    },
    "language": {
      "default": "zh-tw",
      "enum": [
        "zh-tw",
        "en"
      ],
      "title": "Language",
      "type": "string"
    }
  },
  "required": [
    "seconds"
  ],
  "title": "duration_humanizeArguments",
  "type": "object",
  "additionalProperties": false
}

How to call

Starter — params in the table above
tw_duration_humanize({ seconds: 10 })