| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString | [Back] [Original] |
Get to know MDN better
const event = new Date("August 19, 1975 23:15:30");
console.log(event.toTimeString());
// : "23:15:30 GMT+0200 (CEST)"
// :
toTimeString()
Date toTimeString() HH:mm:ss GMTxxxx (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)".
const d = new Date(0);
console.log(d.toString()); // "Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)"
console.log(d.toTimeString()); // "00:00:00 GMT+0000 (Coordinated Universal Time)"
| ECMAScript 2027 LanguageSpecification # sec-date.prototype.totimestring |
DateDate.prototype.getDate()Date.prototype.getDay()Date.prototype.getFullYear()Date.prototype.getHours()Date.prototype.getMilliseconds()Date.prototype.getMinutes()Date.prototype.getMonth()Date.prototype.getSeconds()Date.prototype.getTime()Date.prototype.getTimezoneOffset()Date.prototype.getUTCDate()Date.prototype.getUTCDay()Date.prototype.getUTCFullYear()Date.prototype.getUTCHours()Date.prototype.getUTCMilliseconds()Date.prototype.getUTCMinutes()Date.prototype.getUTCMonth()Date.prototype.getUTCSeconds()Date.prototype.getYear()Date.prototype.setDate()Date.prototype.setFullYear()Date.prototype.setHours()Date.prototype.setMilliseconds()Date.prototype.setMinutes()Date.prototype.setMonth()Date.prototype.setSeconds()Date.prototype.setTime()Date.prototype.setUTCDate()Date.prototype.setUTCFullYear()Date.prototype.setUTCHours()Date.prototype.setUTCMilliseconds()Date.prototype.setUTCMinutes()Date.prototype.setUTCMonth()Date.prototype.setUTCSeconds()Date.prototype.setYear()Date.prototype.toDateString()Date.prototype.toISOString()Date.prototype.toJSON()Date.prototype.toLocaleDateString()Date.prototype.toLocaleString()Date.prototype.toLocaleTimeString()Date.prototype.toString()Date.prototype.toTemporalInstant()Date.prototype.toTimeString()Date.prototype.toUTCString()Date.prototype.valueOf()Date.prototype[Symbol.toPrimitive]()Object/Function| Web Proxy Viewer | New URL | Original Page |