-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- support 上午/下午 (like AM/PM, supported in en-US and other locales) - `format(number)` guess format if table is missing value - removed entry 65535 from table
- Loading branch information
1 parent
b00f11c
commit 885b27f
Showing
14 changed files
with
276 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SSF.version = '0.11.0'; | ||
SSF.version = '0.11.1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* Defaults determined by systematically testing in Excel 2019 */ | ||
|
||
/* These formats appear to default to other formats in the table */ | ||
var default_map/*:Array<number>*/ = []; | ||
var defi = 0; | ||
|
||
// 5 -> 37 ... 8 -> 40 | ||
for(defi = 5; defi <= 8; ++defi) default_map[defi] = 32 + defi; | ||
|
||
// 23 -> 0 ... 26 -> 0 | ||
for(defi = 23; defi <= 26; ++defi) default_map[defi] = 0; | ||
|
||
// 27 -> 14 ... 31 -> 14 | ||
for(defi = 27; defi <= 31; ++defi) default_map[defi] = 14; | ||
// 50 -> 14 ... 58 -> 14 | ||
for(defi = 50; defi <= 58; ++defi) default_map[defi] = 14; | ||
|
||
// 59 -> 1 ... 62 -> 4 | ||
for(defi = 59; defi <= 62; ++defi) default_map[defi] = defi - 58; | ||
// 67 -> 9 ... 68 -> 10 | ||
for(defi = 67; defi <= 68; ++defi) default_map[defi] = defi - 58; | ||
// 72 -> 14 ... 75 -> 17 | ||
for(defi = 72; defi <= 75; ++defi) default_map[defi] = defi - 58; | ||
|
||
// 69 -> 12 ... 71 -> 14 | ||
for(defi = 67; defi <= 68; ++defi) default_map[defi] = defi - 57; | ||
|
||
// 76 -> 20 ... 78 -> 22 | ||
for(defi = 76; defi <= 78; ++defi) default_map[defi] = defi - 56; | ||
|
||
// 79 -> 45 ... 81 -> 47 | ||
for(defi = 79; defi <= 81; ++defi) default_map[defi] = defi - 34; | ||
|
||
// 82 -> 0 ... 65536 -> 0 (omitted) | ||
|
||
/* These formats technically refer to Accounting formats with no equivalent */ | ||
var default_str/*:Array<string>*/ = []; | ||
|
||
// 5 -- Currency, 0 decimal, black negative | ||
default_str[5] = default_str[63] = '"$"#,##0_);\\("$"#,##0\\)'; | ||
// 6 -- Currency, 0 decimal, red negative | ||
default_str[6] = default_str[64] = '"$"#,##0_);[Red]\\("$"#,##0\\)'; | ||
// 7 -- Currency, 2 decimal, black negative | ||
default_str[7] = default_str[65] = '"$"#,##0.00_);\\("$"#,##0.00\\)'; | ||
// 8 -- Currency, 2 decimal, red negative | ||
default_str[8] = default_str[66] = '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)'; | ||
|
||
// 41 -- Accounting, 0 decimal, No Symbol | ||
default_str[41] = '_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)'; | ||
// 42 -- Accounting, 0 decimal, $ Symbol | ||
default_str[42] = '_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)'; | ||
// 43 -- Accounting, 2 decimal, No Symbol | ||
default_str[43] = '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)'; | ||
// 44 -- Accounting, 2 decimal, $ Symbol | ||
default_str[44] = '_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
function fix_hijri(/*::date, o*/) { return 0; } | ||
function fix_hijri(date/*:Date*/, o/*:[number, number, number]*/) { | ||
/* TODO: properly adjust y/m/d and */ | ||
o[0] -= 581; | ||
var dow = date.getDay(); | ||
if(date < 60) dow = (dow + 6) % 7; | ||
return dow; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var THAI_DIGITS = "\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59".split(""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.