Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for /trunk/dates/date-functions.js #6

Open
GoogleCodeExporter opened this issue Apr 24, 2015 · 0 comments
Open

Patch for /trunk/dates/date-functions.js #6

GoogleCodeExporter opened this issue Apr 24, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

FIX: get the month names from the configured(possibly translated) lists
FIX: added some pattern modifiers so month names could be less strict 
parsed(case-insensitive for example). Implemented modifiers:ignoreCase(so jan 
would be equivalent to jAN), start(start with a certain date format, ignores 
the rest), end, contains, resetDay(if no day was specified, its assumes to be 
'1' instead of current day)
NEW: the function is created bu using new Function instead of eval(). We can 
try and catch parse errors this way, and according to some tests its a little 
faster than eval(http://jsperf.com/function-vs-constructor-vs-eval)
NEW: monthNames, dayNames can now be translated(it can parse from multiple 
languages now). The first defined trnaslation is the one used by the date 
formatter. Added translations for ["ro","en","ua","hu","bg","ru"]

Original issue reported on code.google.com by [email protected] on 11 Mar 2011 at 8:06

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant