[Pkg-javascript-commits] [dojo] 02/07: Fixes #17085. Change weekday label regexp from \S+ to .+? so that embedded spaces can be matched (Hebrew). Add automated test. !strict

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.9.1
in repository dojo.

commit 5e5265048681dc79eea0d21bfcf8d5ac92430d20
Author: Douglas Hays <doughays at dojotoolkit.org>
Date:   Thu May 2 18:18:46 2013 +0000

    Fixes #17085.  Change weekday label regexp from \S+ to .+? so that embedded spaces can be matched (Hebrew).  Add automated test. !strict
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.9/dojo@31415 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 date/locale.js       | 2 +-
 tests/date/locale.js | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/date/locale.js b/date/locale.js
index 67843ed..f1f31ea 100644
--- a/date/locale.js
+++ b/date/locale.js
@@ -555,7 +555,7 @@ function _buildDateTimeRE(tokens, bundle, options, pattern){
 			case 'E':
 			case 'e':
 			case 'c':
-				s = '\\S+';
+				s = '.+?'; // match anything including spaces until the first pattern delimiter is found such as a comma or space
 				break;
 			case 'h': //hour (1-12)
 				s = '1[0-2]|'+p2+'[1-9]';
diff --git a/tests/date/locale.js b/tests/date/locale.js
index 447d78d..aae4023 100644
--- a/tests/date/locale.js
+++ b/tests/date/locale.js
@@ -251,6 +251,8 @@ define(["doh", "dojo/_base/array", "dojo/i18n", "dojo/_base/kernel", "dojo/date"
 	t.is(new Date(1970,0,31), locale.parse("031", {datePattern:'DDD',selector:'date'}));
 	t.is(new Date(1970,3,10), locale.parse("100", {datePattern:'DDD',selector:'date'}));
 
+				t.isNot(null, locale.parse(locale.format(new Date(), {locale:'he', formatLength:'full', selector:'date'}), {locale:'he', formatLength:'full', selector:'date'}), "Hebrew parse");
+
 			}
 		},
 		{

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list