shal19 / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

strange regex problem? #62

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Im try to modify date.js to change keyword "now" and add "teraz" (mean now
in Polish) so I made a change: 

now:/^n(ow)?|teraz/i

and tested like this:

Date.parse("now")   OK
Date.parse("teraz") FAIL

...and ended with null :( 

but when change to:

now:/^n(ow)?|xeraz/i
Date.parse("xeraz") OK

I have tested also:

now:/^teraz/i
Date.parse("teraz") FAIL

so the "t" char on the beginning is a problem, but why "today" works?

What version of the product are you using? On what operating system?

current date.js, IE and FF on XP

Please provide any additional information below.

Original issue reported on code.google.com by Ksiezykm...@gmail.com on 4 Feb 2009 at 2:25