Hello
I want to sort time from 6 in the morning to the 22 on the night as valid time.
Everything dont match should return false.
In the Android this was a piece of cake:
Is there a equivalent for iOS like in the post theme mentioned?
Thanks in advance and sorry if I search awkwardly
I want to sort time from 6 in the morning to the 22 on the night as valid time.
Everything dont match should return false.
In the Android this was a piece of cake:
B4X:
Sub check_night_silent_conditions()As Boolean
Dim under As Long
Dim above As Long
Dim timenow As Long
DateTime.TimeFormat = "HH:mm:ss"
under = DateTime.TimeParse("06:00:00")
above = DateTime.TimeParse("23:59:59")
timenow = DateTime.now
If under < timenow Then 'below 6 in the morning
hd.ToastMessageShow("Sterownik nie zezwoli","CISZA NOCNA!")
Return False
Else
If above > timenow Then 'above 22 of the night
hd.ToastMessageShow("Sterownik nie zezwoli","CISZA NOCNA!")
Return False
End If
End If
Return True
End Sub
Is there a equivalent for iOS like in the post theme mentioned?
Thanks in advance and sorry if I search awkwardly