[removed] IF time >= 9:30 then

前端 未结 8 2117
一整个雨季
一整个雨季 2020-12-30 11:25

I\'m trying to write a statement that says \"if time is this and less than that then\". I can use get hours and get min. However, I\'m having problems combining a time suc

8条回答
  •  余生分开走
    2020-12-30 11:48

    if the hour is less than 9, true
    or
    if hour is 9 and minutes lt 30, true
    

    so that would look like

    if ((hour < 9) || (hour == 9 && minutes < 30))
    

    Use words to figure out your logic. Symbols are just shortcuts.

提交回复
热议问题