Sha256: 8e42e5c3d941acf4835982137693f194f0236f9daf94c37cc7c191fd77fb4e1f
Contents?: true
Size: 341 Bytes
Versions: 90
Compression:
Stored size: 341 Bytes
Contents
#!/usr/bin/env bash usage() { echo "Usage: leap.sh <year>" >&2 exit 1 } # Check number of params if [[ "$#" != 1 ]]; then usage fi # Check if param is an integer if ! [[ $1 =~ ^[0-9]+$ ]]; then usage fi if [[ $(($1 % 4)) == 0 ]] \ && [[ $(($1 % 100)) != 0 ]] \ || [[ $(($1 % 400)) == 0 ]]; then echo "true" else echo "false" fi
Version data entries
90 entries across 90 versions & 1 rubygems