ECMAScript仕様輪読会 #97
前回: ECMAScript仕様輪読会 #96
Cosenseの招待リンク: https://scrapbox.io/projects/esspec/invitations/85b96c9fa718ce5185e307196ed8fb53
connpass: https://esspec.connpass.com/
ES Spec Draft: https://tc39.es/ecma262/
multipage: https://tc39.es/ecma262/multipage/
X hashtag: #esspec
便利ツール
esspec-memo: https://tars0x9752.github.io/esspec-memo/esspec.html
Scrapbox Codeblock Generator: https://vzvu3k6k.github.io/scrapbox-codeblock/
TC39 Terminology: https://github.com/tc39/how-we-work/blob/main/terminology.md
esmeta playground: https://es-meta.github.io/playground/
時事ネタ
Temporal
Sajiさんの資料
https://speakerdeck.com/sajikix/its-time-to-use-temporal
自己紹介 (近況報告)
syumai syumai.icon
X: https://x.com/__syumai GitHub: https://github.com/syumai
TSを書いて暮らしてます
牡蠣に当たって2~3日寝込んでました
花粉大変ですね
おすすめです
https://github.com/k1LoW/mo
iwatsurut
とくに、イベントもなく過ごしています。
Hacker News に載ってました。Temporal って、テストケースが ~4500もあるらしい。
https://bloomberg.github.io/js-blog/post/temporal/
maru。(まる)
https://x.com/sbleru
https://github.com/sbleru
主にTSで仕事してます。React, Node。
ちょっと気になり
https://www.amazon.co.jp/dp/4814401574
Webブラウザエンジニアリング―Chrome開発者たちから学ぶ、作って理解するブラウザとWebの仕組み
Webブラウザエンジニアリング - O'Reilly Japan(https://www.oreilly.co.jp/books/9784814401574/)
英語では、https://browser.engineering/ にあるようです。
おーあざます!
ドメインがおしゃれyebis0942.icon
インフルでもコロナでもない高熱がなんか流行ってるっぽい
yebis0942(えびす)
https://github.com/yebis0942
GoとTypeScriptを書いて暮らしています
AI時代のターミナル回帰
cmux
Claude Codeとか回すためのターミナルエミュレーター
通知のハンドリングがいい感じ
libghosttyを使っている
LazyVim
全部入りVimみたいなやつ
設定方法とかはGeminiに聞いている
Ryuto Kawazu (河住 龍人)
"Github: @localer-sub"
中学生からプログラミングを初め、Next.jsやSvelteKitなどでのフルスタックWeb開発をしている
現在は、Zigでhttp/1.1サーバーとルーター開発中
igrep(山本悠滋)
https://github.com/igrep/
React Tokyo Fes 2026のスポンサーブースめっちゃ忙しかった
同時編集JavaScript Playground
https://jssync.syumai.workers.dev/rooms/esspec97
前回のあらすじ
https://syumai.github.io/esspec/summaries/summary-96.html
今回のメモ
code:js
const date = new Date();
console.log("toLocaleString:", date.toLocaleString());
console.log("toLocaleDateString:", date.toLocaleDateString());
console.log("toLocaleTimeString:", date.toLocaleTimeString());
toLocaleString: 2026/3/17 20:04:17
toLocaleDateString: 2026/3/17
toLocaleTimeString: 20:04:17
code:js
const date = new Date(275760, 0, 1, 0, 0, 0, 0)
console.log("toLocaleString:", date.toLocaleString());
console.log("toLocaleDateString:", date.toLocaleDateString());
console.log("toLocaleTimeString:", date.toLocaleTimeString());
toLocaleString: 275760/1/1 0:00:00
toLocaleDateString: 275760/1/1
toLocaleTimeString: 0:00:00
code:js
console.log(Date());
console.log(new Date().toString());
Tue Mar 17 2026 20:10:20 GMT+0900 (日本標準時)
Tue Mar 17 2026 20:10:20 GMT+0900 (日本標準時)
code:js
const d = new Date(8000_0000_0000);
console.log("d.toString()", d.toString());
console.log("Date.parse(d.toString())", Date.parse(d.toString()));
console.log("d.valueOf()", d.valueOf());
d.toString() Tue May 09 1995 15:13:20 GMT+0900 (日本標準時)
Date.parse(d.toString()) 800000000000
d.valueOf() 800000000000
code:js
const d = new Date(8000_0000_1234);
console.log("d.toString()", d.toString());
console.log("Date.parse(d.toString())", Date.parse(d.toString()));
console.log("d.valueOf()", d.valueOf());
d.toString() Tue May 09 1995 15:13:21 GMT+0900 (日本標準時)
Date.parse(d.toString()) 800000001000
d.valueOf() 800000001234
code:js
const d = new Date();
console.log(Date.prototype.toString.call(d));
console.log(Date.prototype.toString.call({}));
Tue Mar 17 2026 20:19:54 GMT+0900 (日本標準時)
TypeError: Method Date.prototype.toString called on incompatible receiver #<Object>
code:js
class X extends Date{}
console.log(Date.prototype.toString.call(new X()));
code:js
const date = new Date();
console.log(date.toDateString());
code:js
// 普通のパターン
{
const date = new Date();
console.log(date.toDateString());
}
// 負の数
{
const date = new Date(-1, 0, 1);
console.log(date.toDateString());
}
// 年が3桁のパターン
{
const date = new Date(123, 0, 1);
console.log(date.toDateString());
}
// NaNのパターン
{
const date = new Date(0/0);
console.log(date.toDateString());
}
Tue Mar 17 2026
Fri Jan 01 -0001
Fri Jan 01 0123
Invalid Date
code:js
// 普通のパターン
{
const date = new Date(1990, 1);
console.log(date.toTimeString());
}
00:00:00 GMT+0900 (日本標準時)
code:js
// 普通のパターン
{
const date = new Date(1990, 1);
console.log(date.toTimeString());
console.log(date.toTimeString.call({}));
}
00:00:00 GMT+0900 (日本標準時)
TypeError: Method Date.prototype.toTimeString called on incompatible receiver #<Object>