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

Re: Computed dateTime

Subject: Re: Computed dateTime
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Apr 2024 20:15:50 -0000
Re:  Computed dateTime
On 12/04/2024 22:04, Peter Flynn peter@xxxxxxxxxxx wrote:
I need to do a number of calendar-based computations involving events
determined by formulas such as "third Tuesday of the month" or "5th of
the month provided it is not a Friday". It would be convenient to do
them in the XSLT, although they could be done in a shell script
pre-processor.

Before I go reinventing any wheels, is there a function I have missed
like weekdayinMonth($date as gYearMonth)[1] to return the date of the
first Sunday in the specified month and year?



functx has http://www.xsltfunctions.com/xsl/functx_day-of-week.html giving you a number for the day of the week, once you call that on on the first of Jan of a certain year you are interested in or the first day of a certain month in a certain year you should be able to add the number of days as a duration to get a certain other day.

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.