Talk:Find the last Sunday of each month

From Rosetta Code

task rename

I suggest that this task name be changed to match the Friday version:

Last Monday of each month

(which is an echo of the Rosetta Code task:

Last Friday of each month

Note that Sunday should be capitalized   (as well as Last)   if only to match the Friday task.

I assume renaming the older task is a no-way, Jose situation.

If changed, please change the Cf for the Last Friday of each month   (which refers to this task by name).

Should the Find in the title be dropped to match the Friday task?

-- Gerard Schildberger (talk) 23:03, 16 April 2013 (UTC)

Red herring? Wots say we rename Last Friday of each month to Find a first or last day of week in a month(?)...

This page is effectively going to be a clone of Last Friday of each month...

Wots say we rename Last Friday of each month to Find a first or last day of week in a month(?)... Then redirect this Find last sunday of each month to Find a first or last day of week in a month. Then use Friday and Sunday January 2038 (Vis-à-vis wp:Year 2038 problem) as test cases...

See also: Proposed amendment & rename: Find a first or last day of week in a month

NevilleDNZ (talk) 05:57, 17 April 2013 (UTC)

(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. -- 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? –Donal Fellows (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?

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. -- Gerard Schildberger (talk) 15:05, 17 April 2013 (UTC)