[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

fn:format-dateTime question

David Lee dlee at calldei.com
Mon Mar 12 06:46:14 PST 2012


  fn:format-dateTime question
I'm having a hard time decyphering the specs for the new XQuery 3.0 fn:format-dateTime when it comes to numeric values.
In particular, if you pass a language argument does that take precidence over or affect at all numeric values.

E.g.  what is the expected result of this :
fn:format-dateTime(xs:dateTime("1996-08-30T23:35:09.12-09:00"),"[Y]","hi","AD","US"),

१९९६   or  1996

And this

fn:format-dateTime(xs:dateTime("1996-08-30T23:35:09.12-09:00"),"[Y01]","ar","AD","AE")

٩٦   or 97

In the text for http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/#func-format-dateTime

I don't find any description on how language affects numeric values, or on if the digit values have higher or lesser precidence then the values.
But this example:

Jewish (with Western numbering)

format-date($d, "[D] [Mn] [Y]", "he", "AM", ())

‏26 טבת 5763

Jewish (with traditional numbering)

format-date($d, "[Dאt] [Mn] [Yאt]", "he", "AM", ())

כ״ו טבת תשס״ג



Implies that language with no format digits should be western,
and that format digits override language codes.
Any suggestions on how to clarify this in partiular a refence to the spec where the rules are defined.  I'm sure I missed something.

I do read this:


The language is used to select the appropriate language-dependent forms of:

names (for example, of months)
numbers expressed as words or as ordinals (twenty, 20th, twentieth)
hour convention (0-23 vs 1-24, 0-11 vs 1-12)
first day of week, first week of year

To me this implies that languages has no effect at all on numeric formats.  This is consistant with the example, but thats only by exclusion not inclusion of wording.

Thanks for any suggestions.










----------------------------------------
David A. Lee
http://x-query.com/mailman/listinfo/talk<mailto:http://x-query.com/mailman/listinfo/talk>
http://www.xmlsh.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20120312/f6241559/attachment.html>


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-2011 All Rights Reserved.