Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -1,3 +1,5 @@
|
|||
leap() {
|
||||
cal 02 $1 | grep -q 29
|
||||
is_leap() {
|
||||
local year=$(( 10#${1:?'Missing year'} ))
|
||||
(( year % 4 == 0 && ( year % 100 != 0 || year % 400 == 0 ) )) && return 0
|
||||
return 1
|
||||
}
|
||||
|
|
|
|||
3
Task/Leap-year/UNIX-Shell/leap-year-4.sh
Normal file
3
Task/Leap-year/UNIX-Shell/leap-year-4.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
leap() {
|
||||
cal 02 $1 | grep -q 29
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue