---Chris Burke wrote:
> I'm happy to include these calculations in dates, and overlooked them
> before.
>
> However, the ISO 8601 calendar treats the first day of the week as a
> Monday, and I suggest that both wks and weeknumber do likewise. This
> would mean that the left argument defaults to 1. Also, I don't see any
> point in having a different left argument, so I would just make both
> return the ISO 8601 calendar values only. Are there any other ISO
> calculations that return different values?

I agree that it would be better to change the default left argument to 1. Would 
retaining it as an optional argument allow other week number definitions 
<http://en.wikipedia.org/wiki/Week#Week_number> to be supported? If so I think 
it would be worthwhile retaining it.

In fact I think it would be useful to add a similar optional left argument to 
calendar so that the following is possible.

      0 calendar 2008 1
+---------------------+
|         Jan         |
| Su Mo Tu We Th Fr Sa|
|        1  2  3  4  5|
|  6  7  8  9 10 11 12|
| 13 14 15 16 17 18 19|
| 20 21 22 23 24 25 26|
| 27 28 29 30 31      |
|                     |
+---------------------+

      1 calendar 2008 1
+---------------------+
|         Jan         |
| Mo Tu We Th Fr Sa Su|
|     1  2  3  4  5  6|
|  7  8  9 10 11 12 13|
| 14 15 16 17 18 19 20|
| 21 22 23 24 25 26 27|
| 28 29 30 31         |
|                     |
+---------------------+

0 should probably be the default left argument for calendar to support legacy 
code?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to