Talk:Find the last Sunday of each month: Difference between revisions

m
 
(3 intermediate revisions by 3 users not shown)
Line 28:
 
: (regarding a clone...]:   the programs would be a clone, except some programming examples hardcoded ''Friday'' into the programs and made certain assumptions when the day-of-week was a Friday regarding the length of the month.   The REXX version implemented a generic version such that any last day-of-week can be found;   the code was ripped out of a even more generic program that found the 1st, 2nd, 3rd, 4th, 5th, or last day-of-week for any month, any year.   It would've been nice to have a generic task in the first place, but perhaps that would've been too ambitious. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 13:20, 17 April 2013 (UTC)
 
== Duplicate task? ==
 
Given that this is virtually a duplicate of another task, should we have this one at all? That is, should we delete this one? –[[User:Dkf|Donal Fellows]] ([[User talk:Dkf|talk]]) 14:16, 17 April 2013 (UTC)
 
I think I have seen seen tasks generalised on RC before. Basically create a new "generalised" page with a full description, and test case. Then tag (as deprecated) the old entries in the original page. This allows the original authors to migrate the code at their leisure. And remove the deprecated code when the generalised routine is available.
 
I confess my problem is finding a page name that accurately describes the generalised task. As opposed to finding the last week day, typically Friday. i.e. [[Find a first or last day of week in a month]] is quite a mouthful. How about [[Determine the date of a day of week]]? Any other ideas?
 
[[User:NevilleDNZ|NevilleDNZ]] ([[User talk:NevilleDNZ|talk]]) 14:24, 17 April 2013 (UTC)
 
: If generalization is the goal, this task could be expanded to find the first (or 1st), second (2nd), 3rd, 4th, 5th, or last day-of-the-week for any given month (and year),   or for all months in a year, or somesuch.   If that's done, there's no need to have the ''find last Friday of each month'' task. I would like to see this task re-specified as find ''any'' last day-of-the-week for any month (or all months of a year).   One solution would be to fold this into the ''find last Friday...'' task, and have the previously mentioned requirement as an optional task for the ''Friday...'' task. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:05, 17 April 2013 (UTC)
845

edits