[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

format-date() and negative (BCE) dates

Subject: format-date() and negative (BCE) dates
From: "Martin Holmes gtxxgm-xsl-list-2@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 6 May 2014 22:53:14 -0000
 format-date() and negative (BCE) dates
Consider this BCE date:

-0001-12-29

If I format this using the "AD" (Gregorian) calendar, like this:

  format-date(xs:date('-0001-12-29'),
    '[Y0001]-[M01]-[D01]', (), 'AD', ())

I get an invalid date:

0000-12-29

There is no year zero in the Gregorian calendar. I get the same results using OS (Julian). What am I doing wrong here? The ISO calendar does have a year zero. If I include the E (Era) component in the picture string, I do get "BC", but I don't see why the correct negative-one year is being changed to an incorrect zero-year.

This is using Saxon 9.4 (the one distributed with Oxygen 15.2).

All help appreciated,
Martin

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.