1
1
Fork 0
exercism/jq/leap
Christina Sørensen 1e351d9c3e
feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-12-16 08:26:51 +01:00
..
.exercism feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00
bats-extra.bash feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00
bats-jq.bash feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00
HELP.md feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00
leap.jq feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00
README.md feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00
test-leap.bats feat(jq): two-fer, resistor-color, resistor-color-duo, leap, isogram, flatten-array 2024-12-16 08:26:51 +01:00

Leap

Welcome to Leap on Exercism's jq Track. If you need help running the tests or submitting your code, check out HELP.md.

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!
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).

Instructions

Your task is to determine whether a given year is a leap year.

Source

Created by

  • @glennj

Based on

CodeRanch Cattle Drive, Assignment 3 - https://coderanch.com/t/718816/Leap