Talk:Last Friday of each month: Difference between revisions

→‎command line: added a comment.
m (→‎1582: clarified ''what'' page was locked. -- ~~~~~)
(→‎command line: added a comment.)
 
(8 intermediate revisions by 7 users not shown)
Line 1:
== Java ==
 
The Java example gives me this result (the problem is at the last line):
java LastFridays 2012
2012 Jan 27
2012 Feb 24
2012 Mar 30
2012 Apr 27
2012 May 25
2012 Jun 29
2012 Jul 27
2012 Aug 31
2012 Sep 28
2012 Oct 26
2012 Nov 30
2012 Dec 28
2012 25
[[User:Blue Prawn|Blue Prawn]] 07:30, 31 December 2012 (UTC)
 
: I've had the same problem. getShortMonths() returns 13 elements. I assume this is a bug in certain Java versions. [[User:Fwend|Fwend]] 12:30, 31 December 2012 (UTC)
::Yeah it's happening for me now too (on the Windows and Linux implementations). It must have been changed in a recent update. I hope I would have noticed that when I wrote the example. Do you think we need to fix the example around that? --[[User:Mwn3d|Mwn3d]] 14:11, 31 December 2012 (UTC)
::: When I posted the code, I thought it was a bug in the Java implementation, but according to the documentation it isn't: ''Short month strings. For example: "Jan", "Feb", etc. An array of 13 strings (some calendars have 13 months)...''. [http://www.docjar.com/docs/api/java/text/DateFormatSymbols.html]. I'll fix the example. [[User:Fwend|Fwend]] 14:26, 31 December 2012 (UTC)
 
== command line ==
Why does the task specify that the year is supplied from the command line? This seems to conflate two totally separate language capabilities--date arithmetic and command line handling. For the PHP example, I'm just ignoring the command line requirement. --[[User:Showell|Showell]] 17:37, 20 January 2012 (UTC)
 
: Specifying the year on the command-line makes it easy to check any specified year (or multiple years) without having to change a hard-coded year inside the computer program.   This should be a trivial requirement for most languages.   It also makes it easier to compare how a particular language handles command-line arguments.   -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 17:28, 15 July 2016 (UTC)
 
== task name ==
Line 252 ⟶ 277:
-----
It is really amazing how much misinformation (that's a code word for bad or incorrect information) concerning the subject of the Gregorian calendar, the various switchovers (adoptions), and the subject of the translations of the two styles of dates ('''O.S.''' vs. '''N.S.'''). One website states that Pope Gregory ''ordered'' ten days to be dropped ... and whatnot. As for the Wikipedia's article, it is suprisingly factual and well-formed. Kudos to those authors. -- [[User:Gerard Schildberger|Gerard Schildberger]] 20:36, 22 August 2012 (UTC)
 
 
-----
May I recommen a fantastic url showing all those things brilliantly?
http://emr.cs.iit.edu/home/reingold/calendar-book/Calendrica.html
It's an offspring of a book I own:
Calendrical Calculations by Edward M. Reingold and Nachum Dershowitz
 
--[[User:Walterpachl|Walterpachl]] 11:49, 29 August 2012 (UTC)
 
== Proposed amendment & rename: [[Find a first or last day of week in a month]] ==
 
Wots say we rename [[Last Friday of each month]] to [[Find a first or last day of week in a month]](?)...
Then use Tuesday and Thursday January 2038 (Vis-à-vis [wp:Year 2038 problem]) as test cases...
 
e.g.
<lang algol68>PROC find day of week in month year = (INT wday, month, year)INT: (
¢ Where wday=1,2,3,4... is first Mon,Tue,Wed... ¢
¢ Where wday=-1,-2,-3,... is last Mon,Tue,Wed... ¢
code...
¢ found ¢ day of month EXIT
);</lang>
 
Actually: I'm curious... is this first/last day of week issue specifically addressed in any library, or "[[wp:ICalendar#Events_.28VEVENT.29|icalendar]]" standard?
 
On another topic: We have "Last Friday" snacks every month, and need to order the food 2 days before. AFAIK no calendar program out there automatically caters for a recurrent order like this. (I've failed in google calendar and cron) Any hints.
 
[[User:NevilleDNZ|NevilleDNZ]] ([[User talk:NevilleDNZ|talk]]) 05:53, 17 April 2013 (UTC)