home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 531.lha / TurboText_Utils / ByeLSE / header.ttx next >
Encoding:
Text File  |  1991-07-04  |  1.5 KB  |  71 lines

  1. /* header.txed - insert name, address, date, time */
  2.  
  3. call ckdaylt
  4.  
  5. MoveSOF
  6. InsertLine
  7. InsertLine
  8. Insert '"                                                      Your name here."'
  9. InsertLine
  10. Insert '"                                                      Your street"'
  11. InsertLine
  12. Insert '"                                                      Your city state zip cd."'
  13. InsertLine
  14. Insert '"                                                      U.S.A."'
  15. InsertLine
  16. Insert '"                                                      Telephone num."'
  17. InsertLine
  18. yr = ' ' || delstr(date('s',date('i')),5,4)
  19. dy = ' ' || delstr(date('s',date('i')),1,6)
  20. dd = date('M') || dy || ','|| yr time() IS_CST
  21.  
  22. InsertLine
  23. dd = right(dd,80,' ')
  24. dd = '"' || dd || '"'
  25. Insert dd 
  26.  
  27. InsertLine
  28. InsertLine
  29. InsertLine
  30. InsertLine 
  31. Insert "Name"
  32. InsertLine
  33. Insert "Title"
  34. InsertLine
  35. Insert "Street"
  36. InsertLine
  37. Insert "City ST Zip"
  38. InsertLine
  39. Insert "Phone"
  40. InsertLine
  41. InsertLine
  42. InsertLine
  43. Insert "Dear "
  44.  
  45. exit 0
  46.  
  47.  
  48.  
  49. ckdaylt:
  50. IS_CST = 'CST'
  51. mm = left(date('u'),2)
  52. if (mm < 4) | (mm > 10) then return
  53. IS_CST = 'CDT'
  54. if (mm > 4) & (mm < 10) then return
  55. dd = substr(date('u'),4,2)
  56. if (mm = 4) & (dd > 7)  then return
  57. if (mm = 10) & (dd < 25) then return
  58. IS_CST = 'CST'
  59. mysdt = left(date('s'),4) || mm
  60.  
  61. if mm = 4 then do ai = 1 to dd
  62.     wkdy = date('w',(mysdt || '0' || ai),'s')
  63.     if wkdy = 'Sunday' then IS_CST = 'CDT'
  64.     end
  65. else do ai = dd + 1 to 31
  66.     wkdy = date('w',(mysdt || ai),'s')
  67.     if wkdy = 'Sunday' then IS_CST = 'CDT'
  68.     end
  69. return
  70.  
  71.