Built-in date functions ... qwirk or bug?

Patrick Ritchie flashblade at videotron.ca
Wed Mar 26 13:52:27 PST 2003


I could not run your quickscript as written, Frontier refused to coerce the
date.

When however I wrote out the date like this:

timeToCheck = "March 26 2003, 7:11:11 AM";

It worked fine, giving me 7 and 8 as the hours.

Perhaps you are having a conversion problem, did you read the docs on this?

See the notes at the bottom of this page.

http://docserver.userland.com/coercion/date

Cheers!
Pat

----- Original Message -----
From: "Dylan Raethel" <dylan.raethel at ew.govt.nz>
To: <frontier-users at userland.com>
Cc: "Paul Kennett" <Paul.Kennett at ew.govt.nz>
Sent: Wednesday, March 26, 2003 4:13 PM
Subject: Built-in date functions ... qwirk or bug?


> Hi,
>
> I've a little script that relies on detecting whether a date value is
within
> working hours (Mon-Fri, 8am-6pm).  It works okay but in testing it I came
> across this bug/qwirk.  Can anyone tell me whether the following lines of
> code (should be cut and pastable into quickScript window) behave the same
as
> mine (or correctly)?
>
> The kernalised date.get function is returning a shift to 24hour for the
hour
> times from 1 - 7 am, fine for 8 - 12, & 0.
>
> Trialed on Win 2000
> Running F7.x, Radio 7.x, ... and Radio 8.02 (updated daily)
>
> Okay on MAC OSX classic Frontier 6.2.1
>
> Thx.
> Paul
>
> --- script bit ---
>
> local {
> dayAddr;
> monthAddr;
> yearAddr;
> hourAddr;
> minuteAddr;
> secondAddr;
> timeToCheck};
>
> timeToCheck = "20/03/2003; 07:11:11 a.m.";
> date.get(timeToCheck, @dayAddr, @monthAddr, @yearAddr, @hourAddr,
> @minuteAddr, @secondAddr);
> dialog.notify(hourAddr);  // should be 7, I'm getting 19
>
> timeToCheck = "20/03/2003; 08:11:11 a.m.";
> date.get(timeToCheck, @dayAddr, @monthAddr, @yearAddr, @hourAddr,
> @minuteAddr, @secondAddr);
> dialog.notify(hourAddr);  // I'm getting 8 as expected
>
>
>
> **********************************************************************
> This email is not an official statement of the Waikato
> Regional Council unless otherwise stated.
> Visit our website http://www.ew.govt.nz
> **********************************************************************
>




More information about the Frontier-Users mailing list