Updated add date function to create 31 option