πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Calendar question

#17204
From: Johan Forsberg
Date: Wed, 02 Dec 1998 00:00
15 lines
913 bytes

Jonathan <plaskowj@logica.com> skrev i inlοΏ½gg
<733h3u$svi6@forums.borland.com>...
> I am trying to find a method for finding how many days there are in a
> particular month of a particular year. Although this can be hard coded,
the
> problem arises with a leap year, so i need a method for determining a
months
> length in relation to a year,

In JDK 1.2 you can make a Calendar object and call
getActualMaximum(Calendar.MONTH).

In JDK 1.1 you have to calculate the length of the month yourself.
Technical Details
Message-ID: <01be1de6$65b50bc0$6bcc79c0@pc4107.stmf.se>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <733h3u$svi6@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,788637f83097e2cd
X-Google-Attributes: gidf74b3,public
From: "Johan Forsberg" <jfo@stmf.se>
Subject: Re: Calendar question
Date: 1998/12/02
Message-ID: <01be1de6$65b50bc0$6bcc79c0@pc4107.stmf.se>
X-Deja-AN: 417813310
References: <733h3u$svi6@forums.borland.com>
Organization: ST
Newsgroups: borland.public.jbuilder.java.language