summaryrefslogtreecommitdiff
path: root/resources/src/moment-local-dmy.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/src/moment-local-dmy.js')
-rw-r--r--resources/src/moment-local-dmy.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/resources/src/moment-local-dmy.js b/resources/src/moment-local-dmy.js
new file mode 100644
index 00000000..c67b93e9
--- /dev/null
+++ b/resources/src/moment-local-dmy.js
@@ -0,0 +1,16 @@
+// Use DMY date format for Moment.js, in accordance with MediaWiki's date formatting routines.
+// This affects English only (and languages without localisations, that fall back to English).
+// http://momentjs.com/docs/#/customization/long-date-formats/
+/*global moment */
+moment.locale( 'en', {
+ longDateFormat: {
+ // Unchanged, but have to be repeated here:
+ LT: 'h:mm A',
+ LTS: 'h:mm:ss A',
+ // Customized:
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY LT',
+ LLLL: 'dddd, D MMMM YYYY LT'
+ }
+} );