🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #421

Re: Days between GregorianCalendars

#421
From: William D. Scheidegger Jr
Date: Wed, 05 Aug 1998 00:00
28 lines
1647 bytes
Why not use the built in method:
    int julian = myCalendar.get(Calendar.DAY_OF_YEAR);
Bill Scheidegger

Allan Wax wrote:

> Dag Welinder wrote:
> >
> > Hello!
> >
> > Is it possible to compute the number of days between two dates? I have
> > two instances of GregorianCalendar, each containing a date. Can I
> > compute the number of days between these two dates?
> >
> > Regards, Dag Welinder
>
> Get ACM's Collected Algorithm 199, recode it in Java (I did, took about
> 30 minutes), compute the Julian date for each end point, subtract the
> two numbers, viola!
> --
> <------------------------------------------->
> Allan Wax
> e-mail:  Allan.Wax@jpl.nasa.gov
> FAX:     + (213) 935-9292
>
> NOTE: The views expressed in this message are
>       my own and do not necessarily reflect
>       those of my employer.
Technical Details
Message-ID: <35C8EC66.D8D304D4@flash.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35C07780.DF0F02D4@bigfoot.com> <35C7A467.26132356@jpl.nasa.gov>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113ae9,14895c81839f4d37
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10a146,14895c81839f4d37
X-Google-Attributes: gid10a146,public
X-Google-Thread: f74b3,14895c81839f4d37
X-Google-Attributes: gidf74b3,public
From: "William D. Scheidegger Jr" <scheideg@flash.net>
Subject: Re: Days between GregorianCalendars
Date: 1998/08/05
Message-ID: <35C8EC66.D8D304D4@flash.net>
X-Deja-AN: 378340855
Content-Transfer-Encoding: 7bit
References: <35C07780.DF0F02D4@bigfoot.com> <35C7A467.26132356@jpl.nasa.gov>
Content-Type: text/plain; charset=us-ascii
Organization: Flashnet Communications, http://www.flash.net
Mime-Version: 1.0
Newsgroups: comp.lang.java.programmer,comp.lang.java.help,borland.public.jbuilder.java.language