comp.lang.ada
 help / color / mirror / Atom feed
From: Eric Miller <ewmiller@tiac.net>
Subject: Re: How to convert an Fixed_Point to to an Integer ?
Date: 1996/12/23
Date: 1996-12-23T00:00:00+00:00	[thread overview]
Message-ID: <32BF1291.7A8B@tiac.net> (raw)
In-Reply-To: 01bbf058$cbdbf980$LocalHost@jerryware


Jerry van Dijk wrote:
> The question really is: how do I convert an Ada.Calendar.Time (ie a
> Duration, ie a
> ordinary fixed_point type) to an Integer representing the nearest number of
> seconds.

Well, first you have to ask the question "seconds since when?"

If the answer is "since the beginning of the day," you can use a call to
Ada.Calendar.Seconds and convert that to an integer.

If it's since some other date, you'll need to call Ada.Calendar.Day,
.Month, and .Year and do some multiplication.

Cheers,

Eric




  reply	other threads:[~1996-12-23  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-22  0:00 How to convert an Fixed_Point to to an Integer ? Jerry van Dijk
1996-12-23  0:00 ` Eric Miller [this message]
1996-12-23  0:00 ` Jerry van Dijk
1996-12-23  0:00 ` Larry Kilgallen
1996-12-23  0:00   ` Robert Dewar
1996-12-24  0:00     ` Jerry van Dijk
1996-12-24  0:00       ` Robert Dewar
1996-12-24  0:00         ` Norman H. Cohen
1996-12-24  0:00           ` Robert Dewar
1996-12-26  0:00             ` Keith Thompson
1996-12-26  0:00               ` Robert Dewar
1996-12-25  0:00         ` Jerry van Dijk
1996-12-25  0:00           ` Robert Dewar
1996-12-26  0:00             ` Norman H. Cohen
1996-12-27  0:00               ` Jerry van Dijk
1996-12-27  0:00                 ` Leap seconds in Unix time (was: Re: How to convert an Fixed_Point to to an Integer ?) Norman H. Cohen
1996-12-30  0:00               ` How to convert an Fixed_Point to to an Integer ? Mike Young
1996-12-30  0:00                 ` Michael F Brenner
1996-12-30  0:00                 ` 2000 is a leap year (was: How to convert an Fixed_Point to to an Inte) Larry Kilgallen
1996-12-31  0:00                 ` How to convert an Fixed_Point to to an Integer ? Keith Thompson
1997-01-02  0:00             ` 2000 is a leap year (was: How to convert an Fixed_Point to to an Inte) Mike Paley
1996-12-30  0:00 ` How to convert an Fixed_Point to to an Integer ? Steve Jones - JON
1996-12-30  0:00   ` Jacques Rouillard
1996-12-30  0:00 ` Steve Jones - JON
1996-12-30  0:00 ` Dave Barnes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox