I hate dealing with dates.........:(
I want to set my calendarobjects date by using weeknumber (swedish schoo lenvironment
equals that everthing is measured in weeks and not in dates)
I have this code:
String[] ids = TimeZone.getAvailableIDs(1 * 60 * 60 * 1000);
SimpleTimeZone pdt = new SimpleTimeZone(1 * 60 * 60 * 1000, ids[0]);
pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 1 * 60 * 60 * 1000);
pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 1 * 60 * 60 * 1000);
GregorianCalendar MyDate = new GregorianCalendar(pdt);
Boolean IsVego = Boolean.valueOf(request.getParameter("IsVego"));
int Week = Integer.valueOf(request.getParameter("Vecka"), 10).intValue();
int Year = Integer.valueOf(request.getParameter("Year"), 10).intValue();
MyDate.set(GregorianCalendar.YEAR, Year);
MyDate.set(GregorianCalendar.WEEK_OF_YEAR, Week);
MyDate.set(GregorianCalendar.DAY_OF_WEEK, GregorianCalendar.MONDAY);
But It does not change WEEK_OF_YEAR;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Magnus Jansson
IT-Manager
V�dd� folkh�gskola
760 40 V�dd�
Sweden
Phone: +46 (0) 176-528 00
Cellular: +46 (0) 70-370 33 16
Fax: +46 (0) 176-528 28
http://www.vaddo.fhsk.se (work)
http://www.jason.pp.se (private)
ICQ: 52797837
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>