Twinkle HubTwinkle Hub

時間長度人話化

tw_duration_humanize

その他 · 26 件🇹🇼 台湾読み取り専用

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

パラメータ

名前説明
seconds *number
language"zh-tw" | "en"
生の 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"
}

呼び出し方

スターター——パラメータは​上表参照
tw_duration_humanize({ seconds: 10 })