Skip Menu |

This queue is for tickets about the DateTime-Event-Jewish CPAN distribution.

Report information
The Basics
Id: 87009
Status: resolved
Priority: 0/
Queue: DateTime-Event-Jewish

People
Owner: Nobody in particular
Requestors: hxr99v9mxq [...] snkmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in DateTime::Event::Jewish::Parshah for dates 15-21 Adar 5785
Date: Wed, 17 Jul 2013 23:08:48 -0400
To: bug-DateTime-Event-Jewish [...] rt.cpan.org
From: Dave Lerner - CPAN <hxr99v9mxq [...] snkmail.com>
I'm resending this, since the original message seems to have been lost. ----- The module DateTime::Event::Jewish::Parshah outputs the wrong Parashah for the date range 15-21 Adar 5785. The module outputs the Parashah "Vayakhel/Pekudei", but the correct Parashah is "Vayakhel", as determined by checking several other sources. The problem appears to be in the following code in sub parshah: ----- if($parshahNumber==22) { #Vayakhel my $pesachDays = $pesach->{rd_days}; $combined =1 if( ($pesachDays - $workingDays) < 28); next LOOP; } ----- I determined empirically that changing " < 28" to " < 22" fixes the problem for 5785, and works for all 14 year types, for both the Israel and Diaspora cases, at least in the context of my test, which compares the results against the downloadable spreadsheet <http://individual.utoronto.ca/kalendis/hebrew/Torah-Portions.xls> located at <http://individual.utoronto.ca/kalendis/hebrew/parshah.htm>. But there may be a better solution. ----- Perl version: 5.14.2 DateTime::Event::Jewish::Parshah version: 0.01 Operating system: Ubuntu 12.04.2 Kernel: Linux 3.8.0-26-generic #38~precise2-Ubuntu SMP x86_64 ----- ----- Code that demonstrates bug: ----- #!/usr/bin/perl # Demonstrate bug in DateTime::Event::Jewish::Parshah. # For the dates 5785-12-15 through 5785-12-21, # the parashah output is 'Vayakhel/Pekudei', # but the correct parashah is 'Vayakhel'. use DateTime::Event::Jewish::Parshah(); my $date; my $parashah; for (my $day = 15; $day <= 21; $day++) { $date = DateTime::Calendar::Hebrew->new(year=>5785,month=>12,day=>$day); $parashah = DateTime::Event::Jewish::Parshah::parshah($date); # Parashah printed is 'Vayakhel/Pekudei', but should be 'Vayakhel'. print "Parashah for @{[$date->ymd()]} is $parashah\n"; } ----- Suggested patch: ----- 33c33 < our $VERSION = '0.01'; --- Show quoted text
> our $VERSION = '0.02';
175c175 < $combined =1 if( ($pesachDays - $workingDays) < 28); --- Show quoted text
> $combined =1 if( ($pesachDays - $workingDays) < 22);
----- Thanks for a useful module. Dave Lerner
From: hxr99v9mxq [...] snkmail.com
Do you need any more information from me about this bug?
Subject: Re: [rt.cpan.org #87009] Bug in DateTime::Event::Jewish::Parshah for dates 15-21 Adar 5785
Date: Wed, 21 Aug 2013 09:18:47 +0100
To: bug-DateTime-Event-Jewish [...] rt.cpan.org
From: Raphael Mankin <raph [...] mankin.org.uk>
Anything you have will, of course, be useful. But if you are busy then I will sort it out. On Tue, 2013-08-20 at 19:52 -0400, Dave Lerner via RT wrote: Show quoted text
> Queue: DateTime-Event-Jewish > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87009 > > > Do you need any more information from me about this bug?
From: hxr99v9mxq [...] snkmail.com
The reason I asked was that it's been over a month since the bug was reported, and no action has been taken.
Subject: Re: [rt.cpan.org #87009] Bug in DateTime::Event::Jewish::Parshah for dates 15-21 Adar 5785
Date: Wed, 21 Aug 2013 18:29:40 +0100
To: bug-DateTime-Event-Jewish [...] rt.cpan.org
From: Raphael Mankin <raph [...] mankin.org.uk>
On Wed, 2013-08-21 at 07:32 -0400, Dave Lerner via RT wrote: Show quoted text
> Queue: DateTime-Event-Jewish > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87009 > > > The reason I asked was that it's been over a month since the bug was reported, and no action has been taken.
I am away on holiday. Will be home for yom tov.
Version 0.05 has been uploaded and should resolve the issue.