Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
toTimeString() は Date インスタンスのメソッドで、この日時の地方時での時刻部分を英語で返します。
なし。
指定された日時の時刻部分を表す文字列(書式については説明を参照してください)。日時が無効の場合は "Invalid Date" を返します。
Date インスタンスは特定の時点を参照します。toTimeString() は日付を地方時で解釈し、時刻 の部分を英語で整形します。これは常に HH:mm:ss GMT±xxxx (TZ) の形式を使用します。
| HH | 時、2 桁(必要であれば先頭の 0 を含む)。 |
| mm | 分、2 桁(必要であれば先頭の 0 を含む)。 |
| ss | 秒、2 桁(必要であれば先頭の 0 を含む)。 |
| ±xxxx | 地方時のオフセット - 時: 2 桁、分: 2 桁 (e.g. -0500, +0800) |
| TZ | 地方時の名前(PDT, PST など) |
例: "04:42:04 GMT+0000 (Coordinated Universal Time)".
| ECMAScript® 2027 Language Specification # sec-date.prototype.totimestring |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年6月19日 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.