Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonasdan committed Jan 17, 2023
1 parent fa541cd commit 2c49fc3
Show file tree
Hide file tree
Showing 24 changed files with 41 additions and 34 deletions.
2 changes: 1 addition & 1 deletion dist/js/jQuery-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*global $, tempusDominus */

/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2021 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/js/jQuery-provider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/js/tempus-dominus.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/tempus-dominus.esm.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/tempus-dominus.esm.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/js/tempus-dominus.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/tempus-dominus.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/tempus-dominus.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/locales/ar-SA.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/ar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/de.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/es.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/fi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/fr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/it.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/nl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/pl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/ro.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/ru.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/sl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/locales/tr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
13 changes: 10 additions & 3 deletions dist/plugins/customDateFormat.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down Expand Up @@ -259,6 +259,13 @@
const format = this.replaceTokens(this.localization.format ||
`${this.englishFormats.L}, ${this.englishFormats.LT}`, this.localization.dateFormats);
const formatter = (template) => new Intl.DateTimeFormat(this.localization.locale, template).format(dateTime);
//if the format asks for a twenty-four-hour string but the hour cycle is not, then make a base guess
const HHCycle = this.localization.hourCycle.startsWith('h1')
? 'h24'
: this.localization.hourCycle;
const hhCycle = this.localization.hourCycle.startsWith('h2')
? 'h12'
: this.localization.hourCycle;
const matches = {
yy: formatter({ year: '2-digit' }),
yyyy: dateTime.year,
Expand All @@ -271,9 +278,9 @@
ddd: formatter({ weekday: 'short' }),
dddd: formatter({ weekday: 'long' }),
H: dateTime.getHours(),
HH: dateTime.getHoursFormatted('h24'),
HH: dateTime.getHoursFormatted(HHCycle),
h: dateTime.hours > 12 ? dateTime.hours - 12 : dateTime.hours,
hh: dateTime.getHoursFormatted('h12'),
hh: dateTime.getHoursFormatted(hhCycle),
t: dateTime.meridiem(),
T: dateTime.meridiem().toUpperCase(),
m: dateTime.minutes,
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/fa-five.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/moment-parse.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Tempus Dominus v6.2.9 (https://getdatepicker.com/)
* Tempus Dominus v6.2.10 (https://getdatepicker.com/)
* Copyright 2013-2022 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
*/
Expand Down

0 comments on commit 2c49fc3

Please sign in to comment.