From d402f2d6aab2dfec2c1dada7d9eade6186c53713 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Tue, 16 Jan 2024 14:49:25 +0100 Subject: [PATCH 1/2] Sync the `leap` exercise's docs with the latest data. --- exercises/practice/leap/.docs/instructions.md | 23 +------------------ exercises/practice/leap/.docs/introduction.md | 16 +++++++++++++ 2 files changed, 17 insertions(+), 22 deletions(-) create mode 100644 exercises/practice/leap/.docs/introduction.md diff --git a/exercises/practice/leap/.docs/instructions.md b/exercises/practice/leap/.docs/instructions.md index dc7b4e81..b14f8565 100644 --- a/exercises/practice/leap/.docs/instructions.md +++ b/exercises/practice/leap/.docs/instructions.md @@ -1,24 +1,3 @@ # Instructions -Given a year, report if it is a leap year. - -The tricky thing here is that a leap year in the Gregorian calendar occurs: - -```text -on every year that is evenly divisible by 4 - except every year that is evenly divisible by 100 - unless the year is also evenly divisible by 400 -``` - -For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap -year, but 2000 is. - -## Notes - -Though our exercise adopts some very simple rules, there is more to -learn! - -For a delightful, four minute explanation of the whole leap year -phenomenon, go watch [this youtube video][video]. - -[video]: http://www.youtube.com/watch?v=xX96xng7sAE +Your task is to determine whether a given year is a leap year. diff --git a/exercises/practice/leap/.docs/introduction.md b/exercises/practice/leap/.docs/introduction.md new file mode 100644 index 00000000..4ffd2da5 --- /dev/null +++ b/exercises/practice/leap/.docs/introduction.md @@ -0,0 +1,16 @@ +# Introduction + +A leap year (in the Gregorian calendar) occurs: + +- In every year that is evenly divisible by 4. +- Unless the year is evenly divisible by 100, in which case it's only a leap year if the year is also evenly divisible by 400. + +Some examples: + +- 1997 was not a leap year as it's not divisible by 4. +- 1900 was not a leap year as it's not divisible by 400. +- 2000 was a leap year! + +~~~~exercism/note +For a delightful, four-minute explanation of the whole phenomenon of leap years, check out [this YouTube video](https://www.youtube.com/watch?v=xX96xng7sAE). +~~~~ From 570dc7e6692dfc84e35b31de815692be6f9f54ff Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Tue, 16 Jan 2024 14:49:25 +0100 Subject: [PATCH 2/2] Sync the `leap` exercise's metadata with the latest data. --- exercises/practice/leap/.meta/config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/practice/leap/.meta/config.json b/exercises/practice/leap/.meta/config.json index 92668e9d..a67a1b6d 100644 --- a/exercises/practice/leap/.meta/config.json +++ b/exercises/practice/leap/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Given a year, report if it is a leap year.", + "blurb": "Determine whether a given year is a leap year.", "authors": [ "andrej-makarov-skrt" ], @@ -18,6 +18,6 @@ ".meta/example.jl" ] }, - "source": "JavaRanch Cattle Drive, exercise 3", - "source_url": "http://www.javaranch.com/leap.jsp" + "source": "CodeRanch Cattle Drive, Assignment 3", + "source_url": "https://coderanch.com/t/718816/Leap" }