Long year: Difference between revisions

m
Line 2,503:
 
=== Straightforward check using GNU date(1) ===
December 28th is always in the last week of the year, so just check whether or not that's week 53:
 
<lang sh>long_year() {
expr $(date -d "$1-12-28" +%V) = 53 >/dev/null
1,480

edits