Published
Edited
Jun 22, 2022
2 stars
Insert cell
Insert cell
"Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"
Insert cell
Insert cell
new Date("Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)")
Insert cell
Insert cell
String(new Date("Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"))
Insert cell
Insert cell
String(new Date("Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"))
=== "Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"
Insert cell
Insert cell
Insert cell
date = "Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"
Insert cell
Insert cell
String(new Date(date)) === date
Insert cell
Insert cell
(d => String(new Date(d)) === d)("Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)")
Insert cell
Insert cell
((d) => [
d,
String(new Date(d)),
String(new Date(d)) === d
])(
"Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"
)
Insert cell
Insert cell
((a, b) => [a, b, a === b])
(...((d) => [d, String(new Date(d))])
("Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
inspect = expr => {
const statements = [];
const log = d => (statements.push(d), d)
statements.push(expr(log));
return statements;
}
Insert cell
Insert cell
inspect((log) => {
const str = "Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)";
return log(str) === log(String(new Date(str)));
})
Insert cell
Insert cell
inspect((log) =>
((d) => log(String(new Date(d))) === log(d))(
"Wed Oct 11 2017 05:02:00 GMT+0000 (Coordinated Universal Time)"
)
)
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more