Article View: borland.public.jbuilder.java.language
Article #19062Re: Finding weekday for a certain date
From: Tom Holman
Date: Wed, 18 Mar 1998 00:00
Date: Wed, 18 Mar 1998 00:00
37 lines
1459 bytes
1459 bytes
Be careful though, some of the functions do not work correctly. Conrad Hoesle-Kienzlen wrote in message <350F0693.4464AFE2@csi.com>... >Chris, >use "GregorianCalendar" instead. >...Conrad > >Chris Fowlkes wrote: > >> Is there a way to find what weekday a particular day falls on witout >> using depricated methods? >> >> example... >> >> Calendar calendar = Calendar.getInstance(); >> calendar.set(cYear, cMonth, 1); >> int weekday = calendar.get(Calendar.DAY_OF_WEEK ); >> >> This should tell you what day a given month starts on, but weekday >> ALWAYS ends up being zero. >> >> Date dteDate = new Date(cYear - 1900, cMonth, 1); >> int weekday = dteDate.getDay(); >> >> This does work but is depricated. Is there another way? >> >> -- >> ****************************************** >> >> Email address: chris@bitwiseinc.com >> >> ****************************************** > > >
Technical Details
Message-ID:
<6eojpa$smc9@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<350EDE4B.712BFEC0@bitwiseinc.com> <350F0693.4464AFE2@csi.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,e41b6861640661da X-Google-Attributes: gidf74b3,public From: "Tom Holman" <tom.holman@edwards.af.mil> Subject: Re: Finding weekday for a certain date Date: 1998/03/18 Message-ID: <6eojpa$smc9@forums.borland.com> X-Deja-AN: 335243227 References: <350EDE4B.712BFEC0@bitwiseinc.com> <350F0693.4464AFE2@csi.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Edwards AFB Newsgroups: borland.public.jbuilder.java.language