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

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