Calendar calendar = new GregorianCalendar(Integer.parseInt(split[5]), Integer.parseInt(split[3])-1, Integer.parseInt(split[4]));
Why is minus 1 in Integer.parseInt(split[3])-1?
Rozwiązane
Komentarze (5)
- Popularne
- Najnowsze
- Najstarsze
Musisz się zalogować, aby dodać komentarz
Luz kk Molina
24 listopada 2021, 22:54
gha111ganavanqfaka aa a abaa aja
0
Luz kk Molina
24 listopada 2021, 22:54
gha111ganavanqfaka aa a abaa aja
0
Luz kk Molina
24 listopada 2021, 22:53
bdvsmahczms amcanaxanvsnahvsnahvsna
0
Luz kk Molina
24 listopada 2021, 22:53
vjaganwgwjaxwjadw
0
Gellert Varga
24 listopada 2021, 22:46przydatny
I am not too familiar with the Calendar class,
but in the Date class the months are like this:
January = month 0.
February = month 1.
So if you get a date like this:
1988.12.24.
then you have to do: 12-1 , before you make a Date object out of it.
+1