Menu

Dates

Help
fred Petes
2002-02-09
2012-10-08
  • fred Petes

    fred Petes - 2002-02-09

    How do you create dates in xslt?

     
    • Michael Kay

      Michael Kay - 2002-02-17

      There's no direct support for dates in XSLT 1.0, though it comes in XSLT 2.0. It's best to represent them in ISO-8601 notation (YYYY-MM-DD); you can then sort them as text, and pick out the components of the date using substring(). There's also an exslt library for date manipulation (implemented in Saxon): see www.exslt.org.

      Mike Kay