home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxsendat.zip / fixdate.cmd
OS/2 REXX Batch file  |  2000-01-02  |  858b  |  29 lines

  1. /* Copyright Thomas of Pepper Head
  2.    Because some people cannot be bothered writing software thats Y2K complaint!
  3.    for
  4.    PMMAIL 1.95 etc
  5.    set this as your "Accounts -> Properties -> Rexx -> Rexx Send"
  6.    and at least the mail you send will say its being sent in 2000 rather than 00
  7. */
  8. parse arg filename
  9. say filename
  10. i=0
  11. fixneeded = "YES"
  12. do until lines(filename) = 0
  13.     i=i+1
  14.     data.i = linein(filename)
  15.     if fixneeded = "YES" then do
  16.         if pos("Date: ",data.i) = 1 then do
  17.         parse value data.i with day ',' daynumber month year date
  18.             if year < 10 then year = year + 2000
  19.                  data.i = day||',' daynumber month year date
  20.                  fixneeded = "NO"
  21.             end
  22.         end
  23.     end
  24. data.0 = i
  25. do i = 1 to data.0
  26.     rc = lineout(filename,data.i,i)
  27. end
  28. rc = lineout(filename)
  29.