Jon wrote:



Alex Tweedly wrote:

<snip>

2. Unless you need to for some reason I don't see here, don't mess around with date & time.


What I'm trying to do is find a way to express "more than 60 minutes after the most recent time/date stamp" in such a way that it will not fail across noon/midnight boundaries. In Delphi, all times are just expressed as floating point numbers, where each day is "1", 12 hours is "0.5", etc, so all of these calculations are dead triviall in that situation.

About as trivial as they are in Rev - use all your times in seconds and it's just as easy (or easier - integers instead of floating point numbers). If you want to convert them to human-readable date/time you can - that's what convert does for you. But if you just need to compare times, then I find it easier to stick to seconds.

Ah. More puns. So "the seconds" means something different than "seconds". I guess "the seconds" is what I was looking for all along. Difficult to spot, since it is more or less a time/date concept masquerading as a time. But, that said, this simplifies things considerably.

In my own code, I would probably use "seconds()" rather than "the seconds" - but it's personal preference; as a classical language programmer, I find the function style more readable.

--
Alex Tweedly       http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: 18/08/2005

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to