Article View: borland.public.jbuilder.java.language
Article #8234Re: Another Date problems
From: Torsten Welches
Date: Mon, 16 Apr 2001 10:20
Date: Mon, 16 Apr 2001 10:20
30 lines
1719 bytes
1719 bytes
Russel, what you are looking for is the Calendar.DAY_OF_WEEK field (SUNDAY == 1). Torsten Russell schrieb in Nachricht <3ADA9CA6.34E94552@cesma.com.sg>... > > Hi all, > > I am using RedHat6.1 , jdk1.3 and jbuilder3.5. > > I cannot figure out how to know which day is Sunday for specific >month. > > For example below is the code: > > Calendar cal = Calendar.getInstance() --> get current date > System.out.println(cal.get(Calendar.MONTH); > System.out.println(cal.get(Calendar.DAY_OF_MONTH); > > In above example , the month is April , so 1,8,15,22,29 is Sunday. I >need to > display different color in my calendar jsp for these days. > However i have checked in java Calendar classes , there are no method >which will retrieve the value of the day. > > Anybody know how to get day value from month?? > > Thanks very much. wt.
Technical Details
Message-ID:
<3adac6ea_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnewsReferences:
<3ADA9CA6.34E94552@cesma.com.sg>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3d8d20e7c3a33d9 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-04-16 03:36:04 PST From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Newsgroups: borland.public.jbuilder.java.language References: <3ADA9CA6.34E94552@cesma.com.sg> Subject: Re: Another Date problems Date: Mon, 16 Apr 2001 12:20:56 +0200 Lines: 32 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 NNTP-Posting-Host: 195.14.250.7 Message-ID: <3adac6ea_1@dnews> X-Trace: dnews 987416298 195.14.250.7 (16 Apr 2001 03:18:18 -0700) Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews