$s_home > $s_resources > $s_articles eot; $toc = <<
  • $s_furtherReadingLink
  • eot; $additionalLinks = << xmlns="http://www.w3.org/1999/xhtml"> Dates and Time

    Dates and Time

    users, XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), schema developers (DTDs, XML Schema, RelaxNG, etc.), XSLT developers, Web project managers.

    $s_untranslatedChanges

    "; } ?>

    World-wide interaction in real-time (or near real-time) requires unambiguous representations of times and dates. Here are some resources:

    Dates and time in Web pages:

    • Ambiguous dates cause confusion:
      • 02/03/04: This may be March 4th, 2002 (in Japan,...), 2nd of March, 2004 (in Europe) and February 3rd, 2004 (in the USA). It depends on whom you ask, not whether they speak English or not.
    • Use unambiguous dates on your web pages:
      • Always use a four-digit number for the year (this clearly distinguishes the year from the day of the month)
      • Always use words (abbreviated if necessary) for the months
      • For forms, use structured dates and popup menus
    • There were some proposals to add a <date> and/or <time> element to HTML, so that browsers could localize display, but they never materialized.
    • Date and time datatypes are available in XML Schema Part 2: Datatypes.
      • The formats defined are for data interchange, not for display.
      • To interchange a date as it appears in an actual document, define markup such as <date value="2001-05-02">The second of May, 2001</date>.
      • For time periods, use a start date and an end date. Other forms may not be translatable into different calendars.

    And some handy little tools: