home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / DATABASE / HANDYP10.LBR / SAYTODAY.CZD / SAYTODAY.CMD
OS/2 REXX Batch file  |  2000-06-30  |  2KB  |  78 lines

  1. STOR date() to today
  2. STOR $(today,1,2) to month
  3. STOR $(today,4,2) to day
  4. STOR $(today,7,2) to year
  5. STOR val(month) to mo
  6. STOR val(day) to da
  7. IF val(day)<10
  8. STOR $(day,2,1) to day
  9. ENDI
  10. STOR val(year)+1900 to yr
  11. STOR (365*yr)+da+(31*(mo-1)) to fact1
  12. IF mo<3
  13. STOR int((yr-1)/4)-int(.75*(int((yr-1)/100)+1)) to fact2
  14. STOR fact1+fact2 to factor
  15. ELSE
  16. STOR int(.4*mo+2.3)-int(yr/4)+int(.75*(int(yr/100)+1)) to fact2
  17. STOR fact1-fact2 to factor
  18. ENDI
  19. STOR factor+(int(-factor/7)*7) to factor
  20. DO CASE
  21. CASE factor=0
  22. STOR 'Saturday' to today
  23. CASE factor=1
  24. STOR 'Sunday' to today
  25. CASE factor=2
  26. STOR 'Monday' to today
  27. CASE factor=3
  28. STOR 'Tuesday' to today
  29. CASE factor=4
  30. STOR 'Wednesday' to today
  31. CASE factor=5
  32. STOR 'Thursday' to today
  33. CASE factor=6
  34. STOR 'Friday' to today
  35. ENDC
  36. STOR today+', ' to today
  37. DO CASE
  38. CASE mo=1
  39. STOR today+'January' to today
  40. STOR 'January' to title
  41. CASE mo=2
  42. STOR today+'February' to today
  43. STOR 'February' to title
  44. CASE mo=3
  45. STOR today+'March' to today
  46. STOR 'March' to title
  47. CASE mo=4
  48. STOR today+'April' to today
  49. STOR 'April' to title
  50. CASE mo=5
  51. STOR today+'May' to today
  52. STOR 'May' to title
  53. CASE mo=6
  54. STOR today+'June' to today
  55. STOR 'June' to title
  56. CASE mo=7
  57. STOR today+'July' to today
  58. STOR 'July' to title
  59. CASE mo=8
  60. STOR today+'August' to today
  61. STOR 'August' to title
  62. CASE mo=9
  63. STOR today+'September' to today
  64. STOR 'September' to title
  65. CASE mo=10
  66. STOR today+'October' to today
  67. STOR 'October' to title
  68. CASE mo=11
  69. STOR today+'November' to today
  70. STOR 'November' to title
  71. CASE mo=12
  72. STOR today+'December' to today
  73. STOR 'December' to title
  74. ENDC
  75. STOR today+' '+day+', 19'+year to today
  76. RETU
  77.  
  78.