Change name variable
output -> outputDate , outputTime
unitFlags -> unitFlagsDate , unitFlagsTime
Add function if to check variable(inputDate , inputTime) by date(Now)