summaryrefslogtreecommitdiff
path: root/www/wiki/resources/src/moment-dmy.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/resources/src/moment-dmy.js')
-rw-r--r--www/wiki/resources/src/moment-dmy.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/www/wiki/resources/src/moment-dmy.js b/www/wiki/resources/src/moment-dmy.js
new file mode 100644
index 00000000..2b7ca161
--- /dev/null
+++ b/www/wiki/resources/src/moment-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.updateLocale( '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'
+ }
+} );