Thx, i will experiment a little and let you know if I found a solution to my problem !!
-----Original Message----- From: John L. Webber [mailto:[EMAIL PROTECTED] Sent: 12mm2004 9:59 To: [EMAIL PROTECTED] Subject: Re: Working with Weeks (to be translated to DATE > ? AND DATE < ?) for use in query Hi Robby This isn't really a Cocoon question, but: (caveat emptor - haven't tried out this code or thought deeply about it ;-)) (omitting necessary imports) GregorianCalendar now = new GregorianCalendar(); int week = now.get(Calendar.WEEK_OF_YEAR); int firstDay = now.getFirstDayOfWeek(); //The next line is overly simplistic and probably won't really work correctly. You need to compare this day with the actual day, //and set the field accordingly now.set(Calendar.DAY_OF_WEEK, firstDay); int startDate = now.get(Calendar.DAY_OF_MONTH); int startMonth = now.get(Calendar.MONTH); //0-based! int startYear = now.get(Calendar.YEAR); //Now calculate the last day of the week and proceed similarly... Regards, John [EMAIL PROTECTED] wrote: >Suppose I want to offer three hyperlinks... > >*See all Problems last week >*See all Problems this week >*See all Problems next week > >For the middle link, I need to retreive the current weeknumber (e.g. week 2) >with its startdate (05-01-04) and enddate (11-01-04). > >How would i do this in java ?? > >Kind regards, > >Robby > > -- --------------------------------------------------------- Jentro Technologies GmbH John L. Webber, Software Development --------------------------------------------------------- Rosenheimer Str. 145e 81671 M�nchen Tel. +49 89 189 169 80 mailto:[EMAIL PROTECTED] Fax +49 89 189 169 99 http://www.jentro.com --------------------------------------------------------- NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. --------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
