Talk:Last Friday of each month: Difference between revisions
Content deleted Content added
problem with Java |
→command line: added a comment. |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 17:
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 280 ⟶ 286:
--[[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)
|