how many days into the year
Another way to do it is to ask the Calendar class for the actual maximum days in a given year: This will return 366 for a bisestile year, 365 for a normal one. Note, I used getActualMaximum instead of getMaximum, which will always returns 366.