Commit f952aae6 authored by GoshaZotov's avatar GoshaZotov

tests for DAYS formula

parent 0b1cd136
......@@ -1627,6 +1627,19 @@ $( function () {
strictEqual( oParser.calculate().getValue(), 5 );
} );
test( "Test: DAYS", function () {
ws.getRange2( "A2" ).setValue( "12/31/2011" );
ws.getRange2( "A3" ).setValue( "1/1/2011" );
oParser = new parserFormula( 'DAYS("3/15/11","2/1/11")', "A1", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue(), 42 );
oParser = new parserFormula( "DAYS(A2,A3)", "A1", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue(), 364 );
} );
test( "Test: DAY 2", function () {
oParser = new parserFormula( "DAY(\"20 may 2045\")", "A1", ws );
ok( oParser.parse() );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment