ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
[exslt] Re: Questions about date:parse-date(), date:format-date() and date:date-format
by A. Pagaltzis other posts by this author
Aug 9 2006 3:30PM messages near this date
[exslt] Questions about date:parse-date(), date:format-date() and date:date-format | [exslt] xslt help
& XSLT * é?©å³° å¼  <allan_zhang76@[...].com>  [2006-08-09 09:35]:
>  When I read the specifications for date:format-date() and
>  date:parse-date(), I am a little confused. They look somewhat
>  redundant to me. If I implement the date:format-date(), it
>  seems to cover what date:parse-date() can do.

I have no idea how you got that impression. The functions are
complements.

`format-date` takes a date and a format specification and
returns a string describing the date formatted according to the
specification.

`parse-date` takes an arbitrary string and a format specification
and returns the date that the string describes according to the
format specification.

One function does the opposite of the other.

>  For example: date:format-date("2005-06-03", "yyyy") is the same
>  as date:parse-date("2005-06-03", "yyyy"). Am I right? 

The result is the same, but thatâ??s only because the format you
picked, `yyyy`, produces strings that can be interpreted as a
legal XSD type. If you picked a format thatâ??s not, the functions
would do the opposite of one another.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/> 
_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
Thread:
Allan Zhang76
A. Pagaltzis

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved