format-date include

karen.wilson's Avatar

karen.wilson

04 Aug, 2015 07:32 PM

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]>

  1. 1 Posted by Ryan Griffith on 06 Aug, 2015 07:49 PM

    Ryan Griffith's Avatar

    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 uses Date.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 of MM-dd-yyyy (eg 08-06-2015).

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by karen.wilson on 06 Aug, 2015 08:10 PM

    karen.wilson's Avatar

    Thank you.

    Karen Wilson
    Web Designer
    Southwestern Oklahoma State University
    (580) 774-6147
    [email blocked]<mailto:[email blocked]>

  3. 3 Posted by Ryan Griffith on 06 Aug, 2015 08:21 PM

    Ryan Griffith's Avatar

    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!

  4. Ryan Griffith closed this discussion on 06 Aug, 2015 08:21 PM.

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

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM