Hi Carnë,

After more careful inspection, it appears that when New Years Day falls on a 
Saturday, the holiday is not observed at all. The holidays function does not 
check that, so modifying line 41 will fix that (and also allow holidays to pass 
its test). So please disregard the previous code change suggestion, and 
consider the following instead. 

from holidays.m:
------------------------------------------
  ## New Year's Day
  tmphol = datenum (yrs, 1, 1);
  hol = [hol; tmphol(weekday(tmphol(:)) ~= 7)(:)];
------------------------------------------
I modified the last line from 
  hol = [hol; tmphol(:)];

Thanks for the link. I will submit octave-forge bugs there in the future. 
Should I open up a new thread there for this bug, or is that unnecessary?

-Randy Chamberlin

----- Original Message -----
From: Carnë Draug <carandraug+...@gmail.com>
To: Randy <littleman...@yahoo.com>
Cc: Octave Forge <octave-dev@lists.sourceforge.net>
Sent: Thursday, October 25, 2012 10:56 PM
Subject: Re: [OctDev] [bug #37616] holidays result incorrect when New Year's 
Day falls on Saturday

On 25 October 2012 14:42, Jordi Gutiérrez Hermoso
<invalid.nore...@gnu.org> wrote:
> Follow-up Comment #2, bug #37616 (project octave):
>
>   <http://savannah.gnu.org/bugs/?37616>

Hi Randy

Your patch may fix that problem but needs to be fixed in some other
way as it causes the other tests to fail (just run test holidays to
see what I mean). Could you please find some other way to fix it?
Also, could you please submit Octave Forge related bugs to
https://sourceforge.net/p/octave/bugs/

Thanks,
Carnë


------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to