🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18976

Re: Finding weekday for a certain date

#18976
From: Tom Holman
Date: Wed, 18 Mar 1998 00:00
56 lines
1992 bytes
I ended up using the date object rather than the GregorianCalendar object.
This means you will use some depricated functions. Sun has bug reports on it
so I hope they will fix them in the next release.

Tom

Chris Fowlkes wrote in message <350FD8D6.919B81FF@bitwiseinc.com>...
>I tried using the GregorianCalendar and got the same result. Do you have a
>working example?
>
>Chris
>
>
>Conrad Hoesle-Kienzlen wrote:
>
>> 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
>> >
>> > ******************************************
>
>
>
>--
>******************************************
>
>Email address:        chris@bitwiseinc.com
>
>******************************************
>
>
Technical Details
Message-ID: <6epck8$ir5@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <350EDE4B.712BFEC0@bitwiseinc.com> <350F0693.4464AFE2@csi.com> <350FD8D6.919B81FF@bitwiseinc.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: <6epck8$ir5@forums.borland.com>
X-Deja-AN: 335359834
References: <350EDE4B.712BFEC0@bitwiseinc.com> <350F0693.4464AFE2@csi.com> <350FD8D6.919B81FF@bitwiseinc.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Edwards AFB
Newsgroups: borland.public.jbuilder.java.language