I normally like to make it absolutely unambiguous... A regex is hard to write, but...
authorDaniel Rudolf <rudolf@eifel-online.com>
Sat, 26 Jan 2013 20:10:50 +0000 (21:10 +0100)
committerDaniel Rudolf <rudolf@eifel-online.com>
Sat, 26 Jan 2013 20:10:50 +0000 (21:10 +0100)
wcfsetup/install/files/js/WCF.js

index 997baeece5be16daec5808a143865d504dbfafb2..c20ab7876cd4bedbb016e79761c395f030e21353 100755 (executable)
@@ -2158,7 +2158,7 @@ WCF.Date.Picker = {
                // do the actual replacement
                // this is not perfect, but a basic implementation and should work in 99% of the cases
                // TODO: support literals (magics are escaped in PHP date() by an \, in jQuery UI DatePicker they are enclosed in '')
-               this._dateFormat = format.replace(/([^dDjlzFmMnoYyU\\]*(?:\\.[^dDjlzFmMnoYyU\\]*)*)([dDjlzFmMnoYyU]{1})/g, function(match, part1, part2, offset, string) {
+               this._dateFormat = format.replace(/([^dDjlzFmMnoYyU\\]*(?:\\.[^dDjlzFmMnoYyU\\]*)*)([dDjlzFmMnoYyU])/g, function(match, part1, part2, offset, string) {
                        $.each(replacementTable, function(key, item) {
                                if(part2 == key) {
                                        part2 = item;