Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Since March 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Intl.DurationFormat オブジェクトにより、言語に依存した経過時間の書式化ができます。
新しい Intl.DurationFormat オブジェクトを作成します。
指定されたロケールのうち、ランタイムの既定のロケールで代替することなく対応しているものを配列として返します。
これらのプロパティは Intl.DurationFormat.prototype で定義されており、すべての Intl.DurationFormat インスタンスで共有されます。
Intl.DurationFormat.prototype.constructorインスタンスオブジェクトを作成したコンストラクター関数。Intl.DurationFormat インスタンスの場合、初期値は Intl.DurationFormat コンストラクターです。
Intl.DurationFormat.prototype[Symbol.toStringTag][Symbol.toStringTag] プロパティの初期値は、文字列 "Intl.DurationFormat" です。このプロパティは、 Object.prototype.toString() で使用されます。
この DurationFormat オブジェクトのロケールおよび書式設定オプションに従って経過時間を書式化するゲッター関数です。
Intl.DurationFormat.prototype.formatToParts()書式化された経過時間を各部分で表すオブジェクトの配列 (Array) を返します。
Intl.DurationFormat.prototype.resolvedOptions()オブジェクトの初期化時に計算されたロケールおよび書式化オプションを反映したプロパティを持つ新しいオブジェクトを返します。
以下の例は、Intl.DurationFormat オブジェクトを使用して、さまざまなロケールおよびスタイルで再生時間オブジェクトを書式化する方法を示しています。
| Intl.DurationFormat # durationformat-objects |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年6月21日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.