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

Report information
The Basics
Id:
71765
Status:
resolved
Worked:
2 hours (120 minutes)
Users:
FGLOCK: 2 hours (120 minutes)
Priority:
Low/Low

People
Owner:
FGLOCK [...] cpan.org
Requestors:
jdavidb2006 [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
0.18



Subject: Second Tuesday of the month
Date: Tue, 18 Oct 2011 13:32:53 -0500
To: bug-DateTime-Event-Recurrence@rt.cpan.org
From: David Blackstone <jdavidb2006@gmail.com>
The example below is in the POD:

    # second tuesday of every month
    my $set = DateTime::Event::Recurrence->monthly( weeks => 2, days => 2 );


I consider this to be broken because it does not work as described.  The behavior that is received is not "second Tuesday of the month" but "Tuesday of the second week of the month."  There is a distinction between these two scenarios and people do not use the first to describe the second.  The second Tuesday of the month is not dependent on when the week starts, as is the Tuesday of the second week.

This has been reported as bug 54166.  I apologize for opening a new bug, but I do not know how to comment on the existing bug.

The workaround in 54166 still does not handle the case of generating second Tuesday of the month.  It only lets you change when the calculation of weeks starts.  Second Tuesday of the month is independent of what week number it occurs in.

Documentation for the 1su 1mo 1tu ... options is unclear.
Documentation fixed in 0.19 after a discussion in the datetime@perl.org mailing list: 0.19 2017-03-07 - Documentation: -- "week_start_day" parameter no longer marked "for internal use". -- Fix "week day" examples. Pointed out by Eric Jensen and Zefram in a thread started by Andrew Martin in datetime@perl.org -- Clarify that week_start_day defaults to "1mo", except for yearly recurrences that default to "mo". Patches by David Steinbrunner. -- Updated contact email. Sorry, I've only seen this ticket now, after the bug was fixed. Em Ter Out 18 14:33:05 2011, jdavidb2006@gmail.com escreveu:
Show quoted text
> The example below is in the POD: > > # second tuesday of every month > my $set = DateTime::Event::Recurrence->monthly( weeks => 2, days => 2 ); > > > > I consider this to be broken because it does not work as described. The > behavior that is received is not "second Tuesday of the month" but "Tuesday > of the second week of the month." There is a distinction between these two > scenarios and people do not use the first to describe the second. The > second Tuesday of the month is not dependent on when the week starts, as is > the Tuesday of the second week. > > This has been reported as bug 54166. I apologize for opening a new bug, but > I do not know how to comment on the existing bug. > > The workaround in 54166 still does not handle the case of generating second > Tuesday of the month. It only lets you change when the calculation of weeks > starts. Second Tuesday of the month is independent of what week number it > occurs in. > > Documentation for the 1su 1mo 1tu ... options is unclear.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.