Skip to content

Commit

Permalink
fb74c76891ce37b93c22911c04e0f7e6b811ae3c Fix: Tighten up the ISO8601 …
Browse files Browse the repository at this point in the history
…date detection for Excel formatting. It must be in the date range 1900-9999.

https://datatables.net/forums/discussion/79268/export-jalali-date-to-excel-in-correct-format#latest

77c8edb903218bbc9e1b579c97a1b8a2a0bbc2a5 Merge branch 'master' of github.com:DataTables/Buttons

Sync to source repo @77c8edb903218bbc9e1b579c97a1b8a2a0bbc2a5
  • Loading branch information
dtbuild committed Jun 26, 2024
1 parent 9cbb195 commit 3f1d400
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
],
"src-repo": "http://github.com/DataTables/Buttons",
"last-tag": "3.0.2",
"last-sync": "aed943bae31538308a04dcc81ad23bc05bec1bb5"
"last-sync": "77c8edb903218bbc9e1b579c97a1b8a2a0bbc2a5"
}
2 changes: 1 addition & 1 deletion js/buttons.html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ var _excelSpecials = [
{ match: /^\-?[\d,]+$/, style: 63 }, // Numbers with thousand separators
{ match: /^\-?[\d,]+\.\d{2}$/, style: 64 },
{
match: /^[\d]{4}\-[01][\d]\-[0123][\d]$/,
match: /^(19\d\d|[2-9]\d\d\d)\-(0\d|1[012])\-[0123][\d]$/,
style: 67,
fmt: function (d) {
return Math.round(25569 + Date.parse(d) / (86400 * 1000));
Expand Down
2 changes: 1 addition & 1 deletion js/buttons.html5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/buttons.html5.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/buttons.html5.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ var _excelSpecials = [
{ match: /^\-?[\d,]+$/, style: 63 }, // Numbers with thousand separators
{ match: /^\-?[\d,]+\.\d{2}$/, style: 64 },
{
match: /^[\d]{4}\-[01][\d]\-[0123][\d]$/,
match: /^(19\d\d|[2-9]\d\d\d)\-(0\d|1[012])\-[0123][\d]$/,
style: 67,
fmt: function (d) {
return Math.round(25569 + Date.parse(d) / (86400 * 1000));
Expand Down

0 comments on commit 3f1d400

Please sign in to comment.