Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calendar (WEEK_OF_MONTH) ????

 
Alexandre Martins
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
i have a strange doubt about the classes of the type Calendar.
Before, i'd like to know if exists a method witch returns me the days in a week, of a month, in a year, something like getDaysOfWeekOfMonthInYear(int week, int month, int year) ?
I did not find anything about, so i decided to implement:

The code returns me the following results:

The problem is, why the new week just starts on the Monday? Shouldn't it start on Sundays?
Regards...
[ December 06, 2004: Message edited by: Alexandre Martins ]
 
Alexandre Martins
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the answer to my own question.
I should set the first day of the week, witch depends on Locale.
use:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic