| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat | [Back] [Original] |
Get to know MDN better
Intl.DurationFormat
Intl.DurationFormat() Intl.DurationFormat
Intl.DurationFormat.prototype Intl.DurationFormat
Intl.DurationFormat.prototype.constructorIntl.DurationFormat Intl.DurationFormat
Intl.DurationFormat.prototype[Symbol.toStringTag][Symbol.toStringTag] "Intl.DurationFormat" Object.prototype.toString()
Intl.DurationFormat.prototype.format() DurationFormat
Intl.DurationFormat.prototype.formatToParts() (Array)
Intl.DurationFormat.prototype.resolvedOptions()Intl.DurationFormat
const duration = {
hours: 1,
minutes: 46,
seconds: 40,
};
// "long" "ja-JP"
new Intl.DurationFormat("ja-JP", { style: "long" }).format(duration);
// "1 46 40 "
// "short" "en"
new Intl.DurationFormat("ja-JP", { style: "short" }).format(duration);
// "1 hr, 46 min and 40 sec"
// "narrow" "ja-JP"
new Intl.DurationFormat("ja-JP", { style: "narrow" }).format(duration);
// "1h46m40s"
| Intl.DurationFormat # durationformat-objects |
| Web Proxy Viewer | New URL | Original Page |