Re: Date calculating software?
- To: mathgroup at smc.vnet.net
- Subject: [mg30412] Re: Date calculating software?
- From: Mark Westwood <mark at galeawestwood.freeserve.co.uk>
- Date: Fri, 17 Aug 2001 03:09:51 -0400 (EDT)
- References: <9ld133$2f3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Noz, Mathematica can do simple things like add a number of days to a given date. Have a closer look at the documentation for the Miscellaneous`Calendar standard add-on package, wherein you'll find a DaysPlus[date, numberOfDays] function. You might want to check out the standard function Date[] first to check how Mathematica represents dates. Adding a number of months is a little trickier - how long are the months you want to add ? Are they solar-mean months, lunar months, does an added February have 28 or 29 days ? If you're not too concerned with such niceties (or with the difficult question of how long a year is) then the standard add-on package Miscellaeous`Units has some predefined figures for Year, Month, Fortnight, etc. And if you want to go a bit further into it 'Calendrical Calculations' by Dershowitz and Reingold give a good algorithmic treatment of a lot of the issues involved. Happy computing Mark Westwood Pilot Solutions Ltd Noz wrote: > Hi > > Is there a software program or calculator available that can eg. Add a > period of time to a date? > > example, today is 14 August 2001. > > 14082001 + 18 months > > or > > 14082001 + 1yr, 3mths, 4 days, and produces the date 1yr, 3mths and 4 days > hence? > > Thanks in advance > > Noz > > > > -- > > > > >