# presuming that the files are e. g. template-2017-07-01-16:
# To test a given date
for file in template-2017-07-01-{00..23}; do
if ! [[ -f "$file" ]]; then
echo "$file is missing"
fi
done
# To test a given year
year=2017
for month in seq -w 1 12; do
dim=$( cal $( date -d "$year-$month-01" "+%m %Y" | awk 'NF { days=NFdays=$NF} END {print days}' )
for day in $(seq -w 1 $dim); do
for file in template-${year}-${month}-${day}-{00..23}; do
if ! [[ -f "$file" ]]; then
echo "$file is missing"
fi
done
done
done