<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>XPATH on ilikeorangutans</title><link>https://kuelzer.ca/tags/xpath/</link><description>Recent content in XPATH on ilikeorangutans</description><generator>Hugo</generator><language>en</language><copyright>© 2026 Jakob Külzer</copyright><lastBuildDate>Sun, 12 Apr 2026 14:27:24 -0400</lastBuildDate><atom:link href="https://kuelzer.ca/tags/xpath/index.xml" rel="self" type="application/rss+xml"/><item><title>Date Arithmetics in XSLT 2</title><link>https://kuelzer.ca/posts/2013/04/02/date-arithmetics-in-xslt-2/</link><pubDate>Tue, 02 Apr 2013 13:59:40 -0400</pubDate><guid>https://kuelzer.ca/posts/2013/04/02/date-arithmetics-in-xslt-2/</guid><description>&lt;p&gt;Now here&amp;rsquo;s something I didn&amp;rsquo;t know: XSLT 2 and XPath actually support date arithmetic! Took me a while to figure it out, but here&amp;rsquo;s how it works.&lt;/p&gt;
&lt;p&gt;First, all your dates will have to be in &lt;a href="http://en.wikipedia.org/wiki/ISO_8601"&gt;ISO-8601&lt;/a&gt; format. For dates only it looks like this: &lt;code&gt;YYYY-MM-DD&lt;/code&gt; and for dates and times, like this: &lt;code&gt;YYYY-MM-DDTHH:mm:SS.sssZ&lt;/code&gt;. There&amp;rsquo;s a few other formats, but these are the ones that probably cover all use cases.&lt;/p&gt;
&lt;p&gt;In order to make use of all the functions regarding date and time, the values will have to be converted into the appropriate types. They data types are defined in the XMLSchema namespace &lt;a href="http://www.w3.org/2001/XMLSchema"&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt; and are:&lt;/p&gt;</description></item></channel></rss>