For some weird reason.. Calendar.getInstance().get(Calendar.WEEK_OF_MONTH)
returns 0
, while command in linux returns 1
root@ns4009576:~# echo $((($(date +%d)-1)/7+1))
1
In the beginning i thought it could be that first day is Monday, so Sunday (today) is month 0 (?) but that doesn't seem to be the case either, locale returns Sunday as first day
root@ns4009576:~# locale day
Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday
Any help would be appreciated, thank you.
System.out.println(Calendar.getInstance());
- Michael Konietzka