In the umbraco.library there are a number of date functions that'll help. Also some in the Exslt.DateTime library.
In your xslt file, click the 'value of' icon in the toolbar. In the dialog that appears, click the 'extensions' button on the right of the window. Then select the library and you'll see a list of all the helper functions available. Lots of great gems in there!
But for more advanced stuff, where you need to take different criteriae into account (timezones, "today", etc.) you should check out the following methods in the umbraco.library namespace:
Are there any library functions for comparing dates?
I need an easy way of testing if a supplied date falls within a range in XSLT - how do you suggest I best achieve this?
thanks
In the umbraco.library there are a number of date functions that'll help. Also some in the Exslt.DateTime library.
In your xslt file, click the 'value of' icon in the toolbar. In the dialog that appears, click the 'extensions' button on the right of the window. Then select the library and you'll see a list of all the helper functions available. Lots of great gems in there!
cheers,
doug.
Hi manwood,
For the simplest stuff, you can make use of the fact that the way dates are stored in XML, they are sortable and comparable as plain text, e.g.:
But for more advanced stuff, where you need to take different criteriae into account (timezones, "today", etc.) you should check out the following methods in the umbraco.library namespace:
Also, the Exslt.DatesAndTimes namespace has some useful functions, whose names escape me at the moment.
/Chriztian
Aargh... :-) too slow on the keys...
/Chriztian
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.