Seems like an interesting home work assignment. Is the first week of the year the first week that has a date in the year or the first week that starts after the first day? So if Jan 1 is a Tuesday, does the first week start on the Sunday before or the Sunday after? A good place to start would be to discover the first Sunday of the year. That is fairly easy to do using the Java API. Then you can work it out from there.