help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specific Date functions in Octave


From: PhilipNienhuis
Subject: Re: Specific Date functions in Octave
Date: Wed, 4 Jul 2012 08:06:04 -0700 (PDT)

Mark Lytle wrote
> 
> Hello all,
> 
> What function would i use to determine the number of business days between
> 2 dates?
> 
> And the complementary function I'm looking for would add a number of
> business days to a given date to project a new date.  Does anybody know
> what those function names are?
> 

In ML it's called daysdif or days252bus. Octave doesn't have them AFAIK.

You could have a look in the Financial package:

http://octave.sourceforge.net/financial/overview.html#Time

There are some functions listed there you could use to make the required
functions yourself. In particular, isbusday() has been implemented (I never
used it but it seems indispensable for what you want). 

As to reliability, I don't know - you'll have to check yourself. Some
examples:

isbusday (today())  ## (where today = July 4th, 2012) correctly (for US
citizens) yields: 
ans = 0

datestr (busdate (today))
ans = 05-Jul-2012

...so it seems to work.

Have fun with it,

Philip

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Specific-Date-functions-in-Octave-tp4631209p4631211.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]