summaryrefslogtreecommitdiff
path: root/jstests/core/date1.js
blob: 65449c662b57889dd42d5ef676402b7508a0201b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

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");