andersnm / ExcelNumberFormat

Parse and render Excel number format strings
MIT License
79 stars 27 forks source link

Fix for date times being formatted 24hr instead of 12hr when AM/PM exists. #18

Closed franknorton closed 4 years ago

franknorton commented 4 years ago

17

Checks for AM/PM existence at the beginning of the formatting. If we have an AM/PM or A/P token then format the h component as 12 hr %h.

Also fixes an issue where A/P wasn't being shown correctly; %t.

Added some extra test cases that cover AM/PM and 12hr.

Updated to .Net Core 2.0 since 1.0 is EOL.