spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← Commit log
commit
message
Testing DATEVALUE more thuroughly
author
Ben Vogt <[email protected]>
date
2017-02-26 20:47:30
stats
1 file(s) changed, 16 insertions(+), 0 deletions(-)
files
tests/FormulasTest.ts
 1diff --git a/tests/FormulasTest.ts b/tests/FormulasTest.ts
 2index 591a813..e263af0 100644
 3--- a/tests/FormulasTest.ts
 4+++ b/tests/FormulasTest.ts
 5@@ -777,10 +777,26 @@ assertEquals(DATE(2004, 3, 1).toNumber(), 38047);
 6 
 7 
 8 // Test DATEVALUE
 9+// m/d/yyyy
10 assertEquals(DATEVALUE("6/24/1992"), 33779);
11 assertEquals(DATEVALUE("06/24/1992"), 33779);
12+// yyyy/m/d
13 assertEquals(DATEVALUE("1992/6/24"), 33779);
14 assertEquals(DATEVALUE("1992/06/24"), 33779);
15+assertEquals(DATEVALUE("1999/1/01"), 36161);
16+assertEquals(DATEVALUE("2222/1/01"), 117610);
17+assertEquals(DATEVALUE("1902/9/02"), 976);
18+assertEquals(DATEVALUE("1902/9/2"), 976);
19+assertEquals(DATEVALUE("4243/11/3"), 856071);
20+assertEquals(DATEVALUE("  1992/04/19  "), 33713);
21+assertEquals(DATEVALUE("1992/5/20"), 33744);
22+assertEquals(DATEVALUE("1992/6/21"), 33776);
23+assertEquals(DATEVALUE("1992/9/29"), 33876);
24+assertEquals(DATEVALUE("1992/1/24"), 33627);
25+assertEquals(DATEVALUE("1992/12/21"), 33959);
26+assertEquals(DATEVALUE("1992/01/31"), 33634);
27+assertEquals(DATEVALUE("1992/1/13"), 33616);
28+
29 
30 
31