format-date include
I'm using the format-date xslt you provided to include in some of my xslt stylesheets. There are 3 different template names...format-date, format-date-string, format-calendar-string. I've used "format-date" for a date that's structured like "Jul 29, 2015 1:00 AM". What types of date formats are used for format-date-string and format-calendar-string?
Karen Wilson
Web Designer
Southwestern Oklahoma State University
(580) 774-6147
[email blocked]<mailto:[email blocked]>
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 06 Aug, 2015 07:49 PM
Hi Karen,
You can see the definition of these templates here and here. To summarize:
format-date-string
expects a string that is of a date format. This template will call a Xalan JavaSript function that usesDate.parse
in the background, which attempts to parse the string into a JavaScript Date object.format-calendar-string
expects a string from a calendar Data Definition field. These fields generate a string in the format ofMM-dd-yyyy
(eg08-06-2015
).Please let me know if you have any questions.
Thanks!
2 Posted by karen.wilson on 06 Aug, 2015 08:10 PM
Thank you.
Karen Wilson
Web Designer
Southwestern Oklahoma State University
(580) 774-6147
[email blocked]<mailto:[email blocked]>
3 Posted by Ryan Griffith on 06 Aug, 2015 08:21 PM
Not a problem at all, Karen, I am glad to hear my summary of the two templates helped clarify things.
I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.
Have a great day!
Ryan Griffith closed this discussion on 06 Aug, 2015 08:21 PM.