RosettaCodeData/Task/Long-year/UNIX-Shell/long-year-1.sh

5 lines
88 B
Bash

long_year() {
cal 1 $1 | grep -q ' 3 *$' && return 0
cal 12 $1 | grep -q ' 26 *$'
}