mirror of https://github.com/rwxrob/dot
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
334 B
Plaintext
15 lines
334 B
Plaintext
3 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
year="$1"
|
||
|
|
||
|
firstday=$(date "+%A, %B %e, %Y" -d "May 4 $year")
|
||
|
firstweekday=$(date "+%u" -d "May 4 $year")
|
||
|
daystilsat=$((6-firstweekday))
|
||
|
sat=$(date "+%A, %B %e, %Y" -d "May 4 $year + $daystilsat days")
|
||
|
|
||
|
echo "$firstday"
|
||
|
for i in {0..16}; do
|
||
|
echo "$sat"
|
||
|
sat="$(date "+%A, %B %e, %Y" -d "$sat + 7 days")"
|
||
|
done
|