General fraction formats are not supported #2590

Open
opened 2020-10-04 03:01:21 +00:00 by snoopyjc · 1 comment
snoopyjc commented 2020-10-04 03:01:21 +00:00 (Migrated from github.com)

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 an error (Unsupported Format).

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 an error (Unsupported Format).
snoopyjc commented 2020-10-04 12:17:54 +00:00 (Migrated from github.com)

Another simple case:

console.log(SSF.format("?/16", 1.25))

Unsupported format error.

Another simple case: console.log(SSF.format("?/16", 1.25)) Unsupported format error.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2590
No description provided.