]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
match scottish gaelic months -
authorJon Ashdown <jon.ashdown@bbc.co.uk>
Mon, 10 Aug 2015 10:27:07 +0000 (11:27 +0100)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 9 Nov 2015 04:35:36 +0000 (20:35 -0800)
these are the letters 'am' or 'an' followed by a space followed by the month name.
Some month names can be preceded by the 't-'.

src/lib/parse/regex.js

index 2fbcc19d9b7214b980cca79fbe98b1fa3e3ccd27..a168de6f25dff8de381202c95981c35f42a8313d 100644 (file)
@@ -19,7 +19,9 @@ export var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:0
 export var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
 
 // any word (or two) characters or numbers including two/three word month in arabic.
-export var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
+// includes scottish gaelic two word and hyphenated months
+export var matchWord = /[0-9]*(a[mn]\s?)?['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\-]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
+
 
 import hasOwnProp from '../utils/has-own-prop';
 import isFunction from '../utils/is-function';