Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 92794
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: wyoung [...] tangentsoft.com
Cc:
AdminCc:

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



Subject: Date arithmetic still shown in v6 documentation
Date: Thu, 6 Feb 2014 19:28:49 -0700
To: bug-Date-Manip [...] rt.cpan.org
From: Warren Young <wyoung [...] tangentsoft.com>
Date::Manip v6 doesn’t support date specifications like “4th Thu in Nov + 1 day” for “the day after Thanksgiving” any more. But, this very example still appears in the docs, apparently a v5 hold-over: http://search.cpan.org/~sbeck/Date-Manip-6.42/lib/Date/Manip/Recur.pod I’m pretty sure I’ve seen it elsewhere, too, but that might be older docs. I can’t find a second instance of this in the copy on cpan.org. The docs should show the recurrence form: 1*11:4:5:0:0:0 That is, every year in the 11th month in the 4th week on day 5 at midnight. You may be tempted to give an alternate form, which does work in v6 if Thanksgiving was previously defined as a holiday in ~/.DateManip.cnf: 1*11:4:4:0:0:0*NWD Please don’t do this, as it doesn’t do the right thing in v5; apparently v5 doesn’t take the previous Thanksgiving definition into account when interpreting the NWD modifier. My alternative above is shorter and works in v5 and v6 as-is. This recurrence should also be given as an example in Date::Manip::Holidays, since it’s likely to be wanted by many people defining holidays. I see no reason to make people reconstruct the recurrence themselves.
As stated in the document: NOTE: unlike date parsing, support for frequencies written out in English (or whatever language you are working in) is extremely limited. For example, the string "the first of every month" will NOT be parsed as a valid frequency. A limited number of frequencies can be expressed in a written out form (see OTHER FREQUENCY FORMATS below), but most must be expressed in the format described below in FREQUENCY NOTATION. In this document however, the written out form will often be used for the sake of clarity. So, the document includes the string you describe because it is clearer to read (especially at the start of the document where I haven't yet introduced the frequency formats), not because it is intended to be a parseable string. All that being said, I'll try to clarify this section a bit.