Menu

#39 Date type

open
None
6
2010-08-17
2010-08-17
No

XSLTForms Build 444

Entering incorrect dates do not fire type error.
For example a/b/c is accepted as a date (implicit conversion seems to be set to now() as seen in associated calendar table)

The dates whose year is less than 1000 are not supported.
For example 25/12/496 is converted to 25/01/1927.

The overflow values (days in the month and months number) are processed with some logic arithmetic, but this is not quite compliant.to ISO 8601
For example, 52/14/2010 becomes 24/03/2011

Discussion

  • Dominique Rabeuf

    • assigned_to: nobody --> alain-couthures
    • priority: 5 --> 6
     
  • Dominique Rabeuf

    xsltforms.js (Rev 444)
    line 686
    str = I8N._format(str, y < 1000? 1900 + y : y, "yyyy");
    Why ?

    Try for testing
    str = I8N._format(str, y, "yyyy");
    Works with years in [100 .. 999], but not with years in [0 .. 99] and negative years
    Calendar is correctly set
    The first day of the year 800 is Saturday :)

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.