Lower case a/p instead giving UPPER CASE #2570

Closed
opened 2020-09-20 14:37:10 +00:00 by snoopyjc · 1 comment
snoopyjc commented 2020-09-20 14:37:10 +00:00 (Migrated from github.com)

To create lower case am/pm, the format a/p"m" is used. This works in Excel, but here the A or P is incorrectly formatted in UPPER CASE, giving results like Am, Pm.

To replicate, use format h:mm a/p"m" on pi, and get result 3:23 Am.

Solution is to check the case of the A/P format in eval_fmt, and give a/p if the user specified "a/p" rather than "A/P".

To create lower case am/pm, the format a/p"m" is used. This works in Excel, but here the A or P is incorrectly formatted in UPPER CASE, giving results like Am, Pm. To replicate, use format `h:mm a/p"m"` on pi, and get result `3:23 Am`. Solution is to check the case of the A/P format in eval_fmt, and give a/p if the user specified "a/p" rather than "A/P".
SheetJSDev commented 2020-09-20 21:51:25 +00:00 (Migrated from github.com)

Thanks for the heads up! Testing in Excel 2019:

am/pm the casing is completely ignored and the result is always uppercase (so AM or PM no matter what you specify)

a/p the character is the one in the string. For the format a/P with lowercase a and uppercase P, Excel 2019 either writes "a" or "P".

We'll have to check some older versions to make sure this is the same behavior

Thanks for the heads up! Testing in Excel 2019: `am/pm` the casing is completely ignored and the result is always uppercase (so AM or PM no matter what you specify) `a/p` the character is the one in the string. For the format `a/P` with lowercase `a` and uppercase `P`, Excel 2019 either writes "a" or "P". We'll have to check some older versions to make sure this is the same behavior
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#2570
No description provided.