]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - resources/src/moment-dmy.js
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / resources / src / moment-dmy.js
diff --git a/resources/src/moment-dmy.js b/resources/src/moment-dmy.js
new file mode 100644 (file)
index 0000000..2b7ca16
--- /dev/null
@@ -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'
+       }
+} );