There have been extensive upgrades in number and date formatting to align with mainstream spreadsheet applications like Excel and Google Sheets.
In previous versions, different symbols for thousand and decimal separators are used based on the locale.
For example #,###.00
is used for 'en' locales and #.###,00
is used for 'de' locales.
In this version, the symbols for thousand and decimal separators are fixed regardless of the locale.
For example, applying the format #,###.00
to the number 1234567.89 results in:
localeFmt
option.
If this option is omitted, the result will be adapted based on the user’s locale.
This makes applications more portable across various locales.
In previous versions, date formating via column.format
, row and cell formats via Range(...).format()
were based on jQueryUI datepicker date syntax.
In this version mainstream Excel like formatting syntax is adopted by PQ Grid for datetime values due to the following reasons:
localeFmt
option, which jQueryUI localization does not support.Below table helps in migrating from jQueryUI format to current format
Date Value (ISO) | jQueryUI Date Format Code ( old ) | Excel Date Format Code ( current ) | Result (Example) |
---|---|---|---|
2024-10-06 | yy-mm-dd | yyyy-mm-dd | 2024-10-06 |
2024-10-06 | dd/mm/yy | dd/mm/yyyy | 06/10/2024 |
2024-10-06 | mm/dd/yy | mm/dd/yyyy | 10/06/2024 |
2024-10-06 | D, d M yy | ddd, d mmm yyyy | Sun, 6 Oct 2024 |
2024-10-06 | DD, d MM yy | dddd, d mmmm yyyy | Sunday, 6 October 2024 |
2024-10-06 | d M, yy | d mmm, yyyy | 6 Oct, 2024 |
2024-10-06 | MM d, yy | mmmm d, yyyy | October 6, 2024 |
You may take help of utility function pq.juiToExcel()
to convert jUI format to Excel format.