Joe Cool
Joe Cool
In Excel, a negative time difference formats with a negative sign. SSF returns a blank result: console.log('"' + SSF.format('[HH]', -12) + '"') ""
Some countries format negative numbers with the '-' on the right. Specifying this as a format gives an Unsupported Format error: Format: #0;#0- Value: -3.14 Expected: 3- Actual: Error: unsupported...
If a format contains multiple '.', Excel treats it as if each '.' after the first one is escaped. For example (from valid.tsv): console.log(SSF.format('00.00.00.000', 12.3456789)) 12.35 Excel gives: 12.34.56.789
In excel, if you have a number format, with a [condition], and that condition can only match negative numbers, then the sign of the value is suppressed. SSF.format incorrectly gives...
`SSF.format('0.0000000', 0.0000001)` gives `1e-7.0000000` instead of `0.0000001`. `SSF.format('#.0', 1E30)` gives `1e+30.0` instead of `1000000000000000000000000000000.0`
An exponential format with no decimal/digits such as `#E-0` shouldn't display the decimal point and digit after it, e.g. `3.14159` displays incorrectly as `3.1E0` instead of `3E0`.
The sign needs to float before any '?' in the format. Eg: console.log(SSF.format('#????', -12.2)) -12 Excel gives: - 12
If a fraction format with an integer part has more '?' than the denominator has digits, then the right-padding with spaces is missing and extra left padding is provided. Also...
Extra spaces are inserted in fraction denominator if the denominator is shorter than the format and there is no integer part: console.log(SSF.format('"s"??/?????????"e"', 0.123251512342345)) s480894/ 3901729e (wrong) s480894/3901729 e (correct)
Fraction formats have the syntax approximated by /[0#,?]*[^0#?]+[0#?]\/(([1-9][0-9]*)|[0#?]+)/. SSF only handles an extremely small subset of possibilities here. For example `SSF.format('#,### ?/10', 1000.1)` should give `1,000 1/10` and instead gives...