Bonjour Colin,

Le 28 oct. 08 à 13:15, Colin Holgate a écrit :

convert the date to seconds
put it into d1
convert "6/6/06" to seconds
put it into d2
put (d1-d2) mod 86400 = 0

This works well for me:

function DaylightSavingsTimeIsActive
  local tCurDate,tRefDate
  -----
  put the short date into tCurDate
  convert tCurDate from short date to dateItems
  put tCurDate into tRefDate
  repeat with i = 2 to 3
    put 1 into item i of tRefDate
    -- January first
  end repeat
  convert tRefDate from dateItems to dateItems
  -- updates last item of dateItems value
  convert tCurDate from dateItems to seconds
  convert tRefDate from dateItems to seconds
  return (tRefDate - tCurDate) mod 86400 = 0
end DaylightSavingsTimeIsActive

Note that I always prefer to convert from a format to another format:
This ensures the process :-)

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/
----------------------------------------------------------------


_______________________________________________
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