Jump to content

Template talk:ISOCALENDAR

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

See Commons for some bugs in this template: [1]. Nsaa 13:45, 31 October 2007 (UTC)[reply]

Strange default behaviour

[edit]

The problems

[edit]

m and y defaults

[edit]

Until now the month and year have been required. If either of them are omitted, we get a table full of error messages. Aren't we better off defaulting to the current year and/or month? Surely we are. JIMp talk·cont 06:47, 1 June 2012 (UTC)[reply]

cw and cdow defaults

[edit]

At commons I mentioned a bug which can crop up when neither cw or cdow are not specified. The default is to highlight the current day of the week of the current week. This is fine if the year also matches, you get today highlighted. If the year is different, however, you get a day with matching week and days numbers, just some other day. Problems also occur when only one of cw or cdow is specified. The unspecified one defaults to the current value with similar ludicrous results.

Here's what I suggest.

  • If neither cw nor cdow are specified, highlight only today.
  • If only cw is specified, highlight the whole week.
  • If only cdow is specified, highlight the corresponding day of the week for the whole month.

No more highlighting partial matches. JIMp talk·cont 06:47, 1 June 2012 (UTC)[reply]

1 default

[edit]

If the first unnamed parameter is left blank, we get "{{{1}}}" as the title. Why not default to the name of the month and the year displayed? Why not? JIMp talk·cont 06:47, 1 June 2012 (UTC)[reply]

The solution

[edit]

All of this has been solved. A new version now sits in the sandbox. I'll soon be replacing the current version. The new version has a couple of other benificial spin offs.

  • The template {{CURRENTCALENDAR}} will be redundant since it's equivalent to the default behaviour of the new version.
  • The templates that the old version has been relying on have been replaced with the {{#time}} parser function thus several of them also might become redundant.
  • It will be possible to specify the month as a word or abbreviation.

JIMp talk·cont 06:47, 1 June 2012 (UTC)[reply]

De-emphasizing days outside the month

[edit]

This seems like a pretty commonsense thing to do -- I am going to look and see how hard this would be. jp×g🗯️ 18:32, 13 February 2024 (UTC)[reply]

The answer is "a gigantic pain in the ass". Implemented -- the template now shows dimmed (style="opacity: 0.3;") cells when the days are outside of the month being displayed. Wow, what a hassle. jp×g🗯️ 19:27, 13 February 2024 (UTC)[reply]