Use a counter variable to avoid all date-parsing logic.

Gets rid of the last instance of `case "$OSTYPE"` ugliness.