cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject OFFLIST - RE: Working with Weeks (to be translated to DATE > ? AND DATE < ?) for use in query
Date Fri, 12 Mar 2004 10:27:21 GMT
Robby,

je moet er wel rekening mee houden dat je systeem dan goed ingesteld moet
staan, d.w.z. in Nederland begint een week op maandag en week 1 is de eerste
week van het jaar met minimaal 4 dagen. In andere landen is het weer anders
(zucht). Als je applicatie uitgaat van de informatie van het onderliggende
systeem, zou het goed moeten gaan, maar als bijv. Windows verkeerd is
ingesteld, krijg je verkeerde weeknummers.

Groetjes, Helma

> -----Original Message-----
> From: robby.pelssers@vodafone.com 
> [mailto:robby.pelssers@vodafone.com] 
> Sent: Friday, 12 March 2004 10:01
> To: users@cocoon.apache.org
> Subject: RE: Working with Weeks (to be translated to DATE > ? 
> AND DATE < ?) for use in query
> 
> 
> 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:John.Webber@jentro.com]
> Sent: 12mm2004 9:59
> To: users@cocoon.apache.org
> 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
> 
> robby.pelssers@vodafone.com 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:John.Webber@jentro.com 
>  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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message