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

Re: date formatting function

Subject: Re: date formatting function
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Sat, 25 Sep 2004 18:43:49 -0400
xsl date
On Sep 25, 2004, at 5:30 PM, Michael Kay wrote:

Your code only seems to be handling English.

Right, but that will change.


Obviously if you write your own formatting you can make it more flexible but it's more code to write and test.

It sounds like you're saying that I need to write it anyway if I want to support anything other than English and German?


If that's the case, it seems like perhaps the substring approach might be better for this context (where my dates aren't always of YYYY-MM-Dd form)?

A minor observation, you could write this much more consisely and
efficiently as

<xsl:variable name="month-part"
              select="('January', 'February', 'March', ...)
                            [xs:int(substring(current(),6,2)]"/>

Thanks.


Bruce

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.