Files
mongo/jstests/core/query/date/date1.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

15 lines
312 B
JavaScript

let t = db.date1;
function go(d, msg) {
t.drop();
t.save({a: 1, d: d});
// printjson(d);
// printjson(t.findOne().d);
assert.eq(d, t.findOne().d, msg);
}
go(new Date(), "A");
go(new Date(1), "B");
go(new Date(0), "C (old spidermonkey lib fails this test)");
go(new Date(-10), "neg");