Need Feedback From Arabic, Chinese And Several Other Cultures

February 10th, 2008 | Code

In preparation for an official final Release Version 1.0 within a month or two, we're just about to stamp the current Datejs code in SVN as Beta.

But... we need some help. One area where we have not received much feedback is testing the Parser with cultures/languages outside of English.

The Datejs library should properly parse month and day names (both full and abbreviated strings) in over 150 different cultures.

The variations of German, Spanish, French and most European culture parsing seem good.

The big unknown cultures are Arabic and Chinese.

Haven't heard much feedback from India either.

The following list details the cultures we're most interested in receiving feedback:

If any developers could confirm the Datejs Parser is working (or not) in any of the above cultures, we would really appreciate the thumbs up/down. By "working", we're specifically interested in whether the Parser is correctly parsing Day and Month names in each culture and whether the expected date format for that culture parses properly.

If the following strings (translated into the appropriate language) return the proper date, things should be good.

Example

Date.parse('July 2008');
Date.parse('Sat July 3, 2004');
Date.parse('Dec');
Date.parse('monday');

The parser ships with some date phrase support (eg. 'today', 'next march'), although those strings may require translation. A couple cultures have already been translated by the community and available for download from the Datejs forums.

To test your culture, download a culture-specific file from SVN /trunk/build/ and add to any web page. If you are using FireFox, the easiest way run test scripts is with FireBug.

Thanks for the help.

5 Comments

  1. About cultures I have a doubt regarding the Italian one.
    I see that for, i.e., “next saturday” I would have to write “next sabato”. But in Italian it does not mean anything! I would have written “sabato prossimo” or “prossimo sabato”. Should “next” be reg-ex-ed using “prossimo” instead of “next”? Same thing holds for other “relative” dates (previous, last, etc…).

    Thank you!

    Comment by Matteo — February 29, 2008 @ 5:46 am

  2. @Matteo – The strings used by the Parser for pattern matching (i.e. “next”, “previous”) are customizable by editing values within the regexPatterns node of the CultureInfo file.

    The string “next” is located within the “future” pattern.

    The string values “previous” and “next” are located within the “past” pattern.

    Once updated the Parser will correctly parse both “prossimo sabato” and “sabato prossimo”.

    Any help translating the strings within the CultureInfo files would be appreciated. Instructions for translating are provided within each culture-specific file located in /trunk/src/globalization/[culture].js

    Several CultureInfo files have been translated by the community with download to each available in the forums (http://www.datejs.com/forums/).

    I hope this helps answer your question.

    Comment by geoffrey.mcgill — March 25, 2008 @ 10:59 pm

  3. Hi,

    I have tried a couple of nationalizations and found only the english to be working properly. I specifically checked the German and French month names and came to the following conclusions:

    1. If there are accented names (e.g. German “März” or French “Février”), these will not be recognized.

    2. Even if a month name is recognized, it may not always deliver the correct date. E.g. try “Oktober” or “Dezember” in the German version, it will result in the current month. The same seems to be the case for any month name of the french translation.

    3. The French regex patterns are crap as they always require the abbreviation period, even if the long name of a month is given. (E.g. “Janvier” does not work, but “Janv.ier” does.)

    The last issue may be solved easily by altering the patterns. I cannot handle, however, the first two. Does anyone have any suggestions on that?

    Best regards,
    Dietmar.

    Comment by Dietmar — May 13, 2009 @ 8:28 am

  4. I don’t know ANYTHING about Arabic, but while trying to localize an app to ar-AE, it can’t seem to handle:

    Date.parse(’07:30 ص’);

    US-equivalent:

    Date.parse(‘7:30 AM’);

    Comment by JRK — August 3, 2009 @ 5:57 am

  5. I haven’t tested the parsing, but in your Persian (Iran) version non of the days or months names are in Farsi (Persian) but just the regular english names. you should really fix that

    Comment by Mahdi — April 10, 2015 @ 9:10 pm

Leave a comment