Leap year: Difference between revisions
Content added Content deleted
(add an implementation for sed) |
(add simple POSIX shell implementation) |
||
Line 3,421: | Line 3,421: | ||
=={{header|UNIX Shell}}== |
=={{header|UNIX Shell}}== |
||
POSIX compatible: |
|||
<syntaxhighlight lang="sh">is_leap() { |
|||
return $((${1%00} & 3)) |
|||
}</syntaxhighlight> |
|||
Original Bourne: |
Original Bourne: |
||
<syntaxhighlight lang="sh">leap() { |
<syntaxhighlight lang="sh">leap() { |