<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" text="#000000"
bgcolor="#FFFFFF">
On 30/12/2012 09:09, Yona Shlomo wrote:<br>
<blockquote
cite="mid:alpine.LRH.2.00.1212300906240.12579@csm.cs.technion.ac.il"
type="cite">
<pre wrap="">Hello,
I have date items of the form yyyy-mm-dd and I'd like to be
able to manipulate them in the following ways:
Given such a date I'd like to ask ordinal questions such as:
what was the date k days before (e.g., what is the date
yesterday) or what will be the date n days from that date
(e.g., what's the date 10 days later).
What's a practical way to go about this?
</pre>
</blockquote>
<br>
I like to use <span style="color: rgb(0, 0, 0); font-family: Arial,
Helvetica, sans-serif; font-size: 13px; font-style: normal;
font-variant: normal; letter-spacing: normal; line-height: 19px;
orphans: 2; text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);"><big><span
class="select-text" style="margin: 0px; padding: 0px; border:
0px; font-size: 15px; font: inherit; vertical-align: baseline;
-webkit-user-select: all;">Date::Calc for things like this.<br>
</span></big></span><a class="moz-txt-link-freetext" href="https://metacpan.org/module/STBEY/Date-Calc-6.3/lib/Date/Calc.pod">https://metacpan.org/module/STBEY/Date-Calc-6.3/lib/Date/Calc.pod</a><span
style="color: rgb(0, 0, 0); font-family: monospace; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 21px; orphans: 2;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); display: inline !important;
float: none;"><br>
<br>
This may be the function your looking for:<br>
($year, $month, $day) = Add_Delta_Days($year, $month, $day, $Dd);</span><strong
style="color: rgb(0, 0, 0); font-family: Arial, Helvetica,
sans-serif; font-size: 13px; font-style: normal; font-variant:
normal; letter-spacing: normal; line-height: 19px; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);"><big><span
class="select-text" style="margin: 0px; padding: 0px; border:
0px; font-size: 15px; font: inherit; vertical-align: baseline;
-webkit-user-select: all;"></span></big></strong><br>
IINM, <span style="color: rgb(0, 0, 0); font-family: monospace;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: 21px;
orphans: 2; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); display: inline !important;
float: none;">$Dd can be negative.</span><br>
<br>
</body>
</html>