Date calculations

Shao Sean shaosean at unitz.ca
Tue Jul 15 17:42:00 EDT 2003


on mouseUp
  -- holds the date that was in the text field "LMP"
  local tLMP

  -- put the text from field "LMP" into our variable
  put the text of field "LMP" into tLMP

  -- convert the date to dateItems (look at the 'convert'
entry in the docs)
  convert tLMP from short system date to dateItems

  -- add 288 days to the date we previously had (yes, it'll
adjust itself correctly)
  add 288 to item 3 of tLMP

  -- convert back from dateItems to normal date format
  convert tLMP from dateItems to system date

  -- display the EDD date
  put tLMP into field "EDD"
end mouseUp



More information about the use-livecode mailing list