and thanks for reading me.
I have a little problem that is that I need to Know the first/last day of a week in a month and a year, so:
public String getFirstDayOfWeekAndMonth(int year, int month, int week){
Calendar weekCalendar = Calendar.getInstance();
weekCalendar.clear();
weekCalendar.set( Calendar.YEAR, year );
weekCalendar.set( Calendar.MONTH, month-1); // zero-based
weekCalendar.set( Calendar.WEEK_OF_YEAR, week );
return... ?
}
For example for the next calendar:
Month Week M T W T F S S FirstDay LastDay
1 1 2 3 4 5 1 5
2 6 7 8 9 10 11 12 6 12
1 3 13 14 15 16 17 18 19 13 19
4 20 21 22 23 24 25 26 20 26
5 27 28 29 30 27 30
5 1 2 3 1 3
6 4 5 6 7 8 9 10 4 10
2 7 11 12 13 14 15 16 17 11 17
8 18 19 20 21 22 23 24 18 24
9 25 26 27 28 25 28
9 1 2 3 1 3
3 10 4 5 6 7 8 9 10 4 10
...
I have problems with the weeks that are in 2 months (on example 5 and 9). Could you help me please?
Thank You very much.
Well, I have develop a method that returns the first and the last day, wothin any other library: