Skip to content

Commit

Permalink
Update the default year when adding a new event
Browse files Browse the repository at this point in the history
If this event is being added after September, there's a high likelihood that it is for next year, not this year.

Signed-off-by: Nathen Harvey <[email protected]>
  • Loading branch information
nathenharvey committed Nov 3, 2018
1 parent ce0a5b9 commit 573f549
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion utilities/add_new_event.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ SEDCMD(){
fi
}

default_year=$(date +"%Y")
if [[ $(date +"%m") -ge 10 ]]; then
default_year=$(date -v +1y "+%Y")
else
default_year=$(date +"%Y")
fi

if [[ ! -z $DOD_YEAR ]] ; then
year="$DOD_YEAR"
else
Expand Down

0 comments on commit 573f549

Please sign in to comment.