Trial Days

Robert Presender rpresender at cox.net
Thu Jun 30 13:24:18 EDT 2005


  I would appreciate any comments on the use of internet date instead of 
english date for tracking trial days of a distributed application. Bad 
idea .. good idea?

The below works OK but is there a simpler way if internet date would be 
used?
--use internet date instead of english date to
--count number of trial days. Take the difference between
--a start date in seconds and a current date in seconds
--divided by 86400 to get number of days.
function fInternetDate
   put the internet date into hold
   if  "Jan" is in word 3 of hold then put 1 & "/" into initialDate
   if  "Feb" is in word 3 of hold then put 2 & "/" into initialDate
   if  "Mar" is in word 3 of hold then put 3 & "/" into initialDate
   if  "Apr" is in word 3 of hold then put 4 & "/" into initialDate
   if  "May" is in word 3 of hold then put 5 & "/" into initialDate
   if  "Jun" is in word 3 of hold then put 6 & "/" into initialDate
   if  "Jul" is in word 3 of hold then put 7 & "/" into initialDate
   if  "Aug" is in word 3 of hold then put 8 & "/" into initialDate
   if  "Sep" is in word 3 of hold then put 9 & "/" into initialDate
   if  "Oct" is in word 3 of hold then put 10 & "/" into initialDate
   if  "Nov" is in word 3 of hold then put 11 & "/" into initialDate
   if  "Dec" is in word 3 of hold then put 12 & "/" into initialDate
   put word 2 of hold & "/" after word 1 of initialDate
   put word 4  of hold after word 2 of initialDate
   convert initialDate to seconds
   return initialDate
end fInternetDate

Thanks

Regards ... Bob




More information about the use-livecode mailing list