home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / parsomat.zip / exampl19.pom < prev    next >
Text File  |  2001-07-15  |  2KB  |  66 lines

  1. OUTEND    |SAMPLE DATE FORMATTING, USING TODAY'S DATE AND JULY 3 1998
  2. OUTEND    |----------------------------------------------------------
  3.  
  4. SET       year  = "1998"
  5. SET       month = "7"
  6. SET       day   = "3"
  7. ;
  8. ;  In the first example, we see that the date format can be omitted, or
  9. ;  can be set to null.  Either method invokes the use of the default date
  10. ;  format string, obtained from the POMDATE.CFG file.
  11. ;
  12. SET       format = ""
  13. TODAY     x
  14. DATE      y year month day ""
  15. OUTEND    |
  16. OUTEND    |Date Format String:  Default date format
  17. OUTEND    |      Today's Date:  {x}
  18. OUTEND    |       July 3 1998:  {y}
  19.  
  20. SET       format = "?n-?d-?y"
  21. TODAY     x format
  22. DATE      y year month day format
  23. OUTEND    |
  24. OUTEND    |Date Format String:  "{format}"
  25. OUTEND    |      Today's Date:  {x}
  26. OUTEND    |       July 3 1998:  {y}
  27.  
  28. SET       format = "d.M.Y"
  29. TODAY     x format
  30. DATE      y year month day format
  31. OUTEND    |
  32. OUTEND    |Date Format String:  "{format}"
  33. OUTEND    |      Today's Date:  {x}
  34. OUTEND    |       July 3 1998:  {y}
  35.  
  36. SET       format = "t d 'y"
  37. TODAY     x format
  38. DATE      y year month day format
  39. OUTEND    |
  40. OUTEND    |Date Format String:  "{format}"
  41. OUTEND    |      Today's Date:  {x}
  42. OUTEND    |       July 3 1998:  {y}
  43.  
  44. SET       format = "(m ?d Y)"
  45. TODAY     x format
  46. DATE      y year month day format
  47. OUTEND    |
  48. OUTEND    |Date Format String:  "{format}"
  49. OUTEND    |      Today's Date:  {x}
  50. OUTEND    |       July 3 1998:  {y}
  51.  
  52. SET       format = "M/?d/Y"
  53. TODAY     x format
  54. DATE      y year month day format
  55. OUTEND    |
  56. OUTEND    |Date Format String:  "{format}"
  57. OUTEND    |      Today's Date:  {x}
  58. OUTEND    |       July 3 1998:  {y}
  59. ;
  60. ;   Since we only want this POM file to be run once (i.e. on a single input
  61. ;   line), we do a NEXTFILE to stop processing the input file.  We could
  62. ;   have used HALT, but that would generate a "Halt Message" display,
  63. ;   which we don't need.
  64. ;
  65. NEXTFILE
  66.