In a message to John Hentsch Ted Menks wrote:
TM> :setGTZ, fourth version by (TM)
TM> set Daytm=%@doy[4-%@eval[8-%@dowi[4-7-%_year]]-4-%_year].02
TM> set Stdtm=%@doy[10-%@eval[32-%@dowi[10-31-%_year]]-%_year].02
TM> set toDay=%@doy[%_date].%@right[2,0%_hour]
TM> iff %toDay ge %Daytm .and. %toDay lt %Stdtm then
TM> set GTZ=UTC+7
TM> else
TM> set GTZ=UTC+8
TM> endiff
TM> unset toDay Daytm Stdtm
TM> return
TM> How 'bout that, pardner ? The truth, the whole truth and nothing
TM> in only 308 bytes ;-)
Nice work Ted! You really compacted the routine down and made it
easier to work with. I plugged it in to my ftsc front end BTM where it
will live happily for years to come:)
jh -
* WCE 2.1G1/2241 *
--- ViaMAIL!/WC4 v1.40j
---------------
* Origin: Mail Box BBS Glendora, CA USA (1:218/907)
|