Talk:Leap year
This is the talk page for discussing improvements to the Leap year article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1, 2, 3Auto-archiving period: 365 days ![]() |
![]() | This article is written in British English, which has its own spelling conventions (colour, travelled, centre, defence, artefact, analyse) and some terms that are used in it may be different or absent from other varieties of English. According to the relevant style guide, this should not be changed without broad consensus. |
![]() | A fact from this article was featured on Wikipedia's Main Page in the On this day section on February 29, 2008, February 29, 2012, and February 29, 2016. |
![]() | This ![]() It is of interest to the following WikiProjects: | ||||||||||
|
![]() | This article has been viewed enough times in a single week to appear in the Top 25 Report. The week in which this happened:
|
![]() | This article has been mentioned by a media organization:
|
section Algorithm: adding Excel example
[edit]- Algorithm
The following pseudocode determines whether a year is a leap year or a common year in the Gregorian calendar (and in the proleptic Gregorian calendar before 1582). The year variable being tested is the integer representing the number of the year in the Gregorian calendar, and the tests are arranged to dispatch the most common cases first. Care should be taken in translating mathematical integer divisibility into specific programming languages.
if (year is not exactly divisible by 4) then (it is a common year)
else
if (year is not exactly divisible by 100) then (it is a leap year)
else
if (year is not exactly divisible by 400) then (it is a common year)
else (it is a leap year)
- Excel
This algorithm translates into Excel like this, whereas year stands for the cell which refers to the input cell:
=IF(NOT((year/4=TRUNC(year/4)));"common year";IF(NOT((year/100=TRUNC(year/100)));"leap year";IF(NOT((year/400=TRUNC(year/400)));"common year";"leap year")))
or reversed, more simplified:
=IF((year/400=TRUNC(year/400));"leap year";IF((year/100=TRUNC(year/100));"common year";IF((year/4=TRUNC(year/4));"leap year";"common year"))
-- 23:17, 20 August 2015 31.151.83.20
- Fine, but an Excel formula is not the sort of thing WP would ordinarily supply. The shape of the algorithm in pseudo-code is appropriate, but translations into specific languages generally not. -- Elphion (talk) 17:51, 26 August 2015 (UTC)
Section "Algorithm" - why?
[edit]Can anyone provide a convincing case for retention of the section Leap year § Algorithm. It looks to me like one editor's pet project. At Leap year § Gregorian calendar, we already have the concise statement
Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400. For example, the years 1700, 1800, and 1900 are not leap years, but the years 1600 and 2000 are.
with a sensibly-sized graphic beside it. What value does this "Algorithm" section add over and above what has been said already? How is it not a WP:NOTMANUAL violation? Furthermore its suggestion that it has any validity before 1582, let alone in the years BC/BCE, is surely just wrong? 𝕁𝕄𝔽 (talk) 11:17, 21 December 2022 (UTC)
- Pending discussion, I have moved it to the end of the article where at least it (and its giant graphic) are not so disruptive. --𝕁𝕄𝔽 (talk) 13:21, 21 December 2022 (UTC)
- The section seems redundant to me Jc3s5h (talk) 01:27, 22 December 2022 (UTC)
As no case has been made to retain that section, I have deleted it. 𝕁𝕄𝔽 (talk) 23:57, 29 December 2022 (UTC)
- Could the section be moved to http://en.wiki.x.io/wiki/Leap_year_problem, where there is now a dead link to the algorithm? 2A02:8010:6008:0:A829:F7:2B5D:F60 (talk) 10:27, 19 September 2023 (UTC)
Repeated information
[edit]I think that the information is repeated in this article. We have first a section called "Julian calendar" and, then, another one called "Julian reform" with the same information but more elaborated. It would be interesting to merge if you agree that it is a repetition. Theklan (talk) 10:22, 31 January 2024 (UTC)
- I'll look closer. But in the mean time, I restored Theklan's removal of the section on the Revised Julian calendar because that is different from the Julian calendar. Jc3s5h (talk) 16:15, 31 January 2024 (UTC)
Changing content
[edit]This edit: https://en.m.wiki.x.io/w/index.php?title=Leap_year&diff=prev&oldid=1230828637
was reverted for some unknown reason. How could we handle this and keep it as the current form, with the example as Halloween and not Christmas? 2601:C6:D200:E9B0:99C2:CF40:D108:35E0 (talk) 00:18, 25 June 2024 (UTC)
- The person wanting a change needs to justify their proposal. It is not reasonable to expect other to justify reverting arbitrary changes. Johnuniq (talk) 00:22, 25 June 2024 (UTC)
- A lot of people in the world have no idea what, and when, Halloween is. - Arjayay (talk) 09:21, 25 June 2024 (UTC)
- So how about we compromise and change the example to a very specific day? 2601:C6:D200:E9B0:A0E3:7891:AA06:7FAE (talk) 16:39, 25 June 2024 (UTC)
- I’ll go make that edit. 2601:C6:D200:E9B0:A0E3:7891:AA06:7FAE (talk) 16:40, 25 June 2024 (UTC)
- The edit has now been made. 2601:C6:D200:E9B0:A0E3:7891:AA06:7FAE (talk) 16:43, 25 June 2024 (UTC)
- I’ll go make that edit. 2601:C6:D200:E9B0:A0E3:7891:AA06:7FAE (talk) 16:40, 25 June 2024 (UTC)
- So how about we compromise and change the example to a very specific day? 2601:C6:D200:E9B0:A0E3:7891:AA06:7FAE (talk) 16:39, 25 June 2024 (UTC)
- Maybe we could remove the example all together as a neutral compromise? I’ll make that edit now. 2601:C6:D200:E9B0:A0E3:7891:AA06:7FAE (talk) 16:50, 25 June 2024 (UTC)
- I have reverted your totally undiscussed removal, made with an edit summary of "as discussed on talk page". You suggested it and immediately did it before anyone else had had a chance to discuss it. - Arjayay (talk) 21:04, 25 June 2024 (UTC)
- If 14 Feb 2024 already passed, and naming holidays would cause an argument, it would make sense to specifically mention March 1st as a notable example, as that day immediately follows February 29 in leap years.Allan Bao (talk) 14:24, 15 July 2024 (UTC)
- I have reverted your totally undiscussed removal, made with an edit summary of "as discussed on talk page". You suggested it and immediately did it before anyone else had had a chance to discuss it. - Arjayay (talk) 21:04, 25 June 2024 (UTC)
- A lot of people in the world have no idea what, and when, Halloween is. - Arjayay (talk) 09:21, 25 June 2024 (UTC)
- Wikipedia articles that use British English
- Selected anniversaries (February 2008)
- Selected anniversaries (February 2012)
- Selected anniversaries (February 2016)
- C-Class vital articles
- Wikipedia level-4 vital articles
- Wikipedia vital articles in Technology
- C-Class level-4 vital articles
- Wikipedia level-4 vital articles in Technology
- C-Class vital articles in Technology
- C-Class Time articles
- Mid-importance Time articles
- Pages in the Wikipedia Top 25 Report
- Wikipedia pages referenced by the press