Mercurial > forge
changeset 11174:86cc8115fced octave-forge
isbusday: accept non-integer values. Patch from Randy <littlemanrkc@yahoo.com>. Closes #37621 from core tracker
author | carandraug |
---|---|
date | Fri, 26 Oct 2012 03:47:33 +0000 |
parents | a3293cbb266c |
children | edfa131336ea |
files | main/financial/NEWS main/financial/inst/isbusday.m |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/main/financial/NEWS Fri Oct 26 03:23:50 2012 +0000 +++ b/main/financial/NEWS Fri Oct 26 03:47:33 2012 +0000 @@ -1,3 +1,8 @@ +Summary of important user-visible changes for financial 0.X.X: +------------------------------------------------------------------- + + ** `isbusday' has been fixed to accept non-integer values. + Summary of important user-visible changes for financial 0.4.0: -------------------------------------------------------------------
--- a/main/financial/inst/isbusday.m Fri Oct 26 03:23:50 2012 +0000 +++ b/main/financial/inst/isbusday.m Fri Oct 26 03:47:33 2012 +0000 @@ -31,7 +31,7 @@ function mask = isbusday (rd, hol=[], wkend=[]) if ~ isnumeric (rd) - rd = datenum (rd); + rd = datenum (rd); endif if isempty (hol) ## Get all possible holidays that could affect the output. @@ -48,7 +48,7 @@ mask = reshape (wkend (weekday (rd)), size (rd)); if ~ isempty (hol) ## Is it a holiday? - mask = mask | ismember(rd, hol); + mask = mask | ismember (floor (rd), hol); endif mask = ~mask; endfunction