I don't know if this is a bug in a library or default behaviour in Java
but this seems suspicious and it's not the output I got in several other languages.
the output is:
19
!19!
0: <- should be 1
1:1 <- should be 9
2:9 <- should not exist
C:3 <- should be 2
the value in the array at position 0 should not even exist since there is no leading space (the !19! proves this)
but this seems suspicious and it's not the output I got in several other languages.
B4X:
Log ( hours )
Log ("!" & DateTime.GetHour(DateTime.Now) &"!")
Log ( "0:" & Regex.Split("",DateTime.GetHour(DateTime.Now))(0) )
Log ( "1:" & Regex.Split("",DateTime.GetHour(DateTime.Now))(1) )
Log ( "2:" & Regex.Split("",DateTime.GetHour(DateTime.Now))(2) )
Log ( "C:" & Regex.Split("",DateTime.GetHour(DateTime.Now)).Length)
the output is:
19
!19!
0: <- should be 1
1:1 <- should be 9
2:9 <- should not exist
C:3 <- should be 2
the value in the array at position 0 should not even exist since there is no leading space (the !19! proves this)