spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← Commit log
commit
message
Adding more date tests
author
Ben Vogt <[email protected]>
date
2017-01-14 18:26:07
stats
1 file(s) changed, 7 insertions(+), 0 deletions(-)
files
tests/SheetFormulaTest.ts
 1diff --git a/tests/SheetFormulaTest.ts b/tests/SheetFormulaTest.ts
 2index 2bc6e4c..6816436 100644
 3--- a/tests/SheetFormulaTest.ts
 4+++ b/tests/SheetFormulaTest.ts
 5@@ -241,6 +241,12 @@ testFormula("=CUMPRINC(0.12, 12, 100, 1, 5, 0)", -26.324171373034403);
 6 
 7 // Test DATE
 8 testFormulaToDate("=DATE(1992, 6, 24)", new Date("6/24/1992").getTime());
 9+testFormulaToDate("=DATE(1992, 13, 24)", new Date("1/24/1993").getTime());
10+testFormulaToDate("=DATE(1992, 6, 44)", new Date("7/14/1992").getTime());
11+testFormulaToDate("=DATE(2, 6, 44)", new Date("7/14/1902").getTime());
12+testFormulaToDate("=DATE(2, 33, 44)", new Date("10/14/1904").getTime());
13+testFormulaToDate("=DATE(1976, 2, 29)", new Date("2/29/1976").getTime());
14+testFormulaToDate("=DATE(1976, 2, 30)", new Date("3/1/1976").getTime());
15 
16 // Test DATEVALUE
17 testFormulaToDate('=DATEVALUE("1992-6-24")', new Date("6/24/1992").getTime());