home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / STDLIB.ZIP / LITDATE.BAS < prev    next >
Encoding:
BASIC Source File  |  1990-10-04  |  3.9 KB  |  101 lines

  1. '****************************************************************************
  2. 'Total Control Systems                                         QuickBasic 4.5
  3. '****************************************************************************
  4. '
  5. '  Program     : LITDATE.BAS
  6. '  Written by  : Tim Beck
  7. '  Written On  : 10-01-90
  8. '  Function    : LITERARY DATE SUBROUTINE
  9. '
  10. '****************************************************************************
  11. '  This program and those associated with it were written for use with Quick-
  12. '  Windows Advanced (Version 1.5+).  Possesion of this program entitles you
  13. '  to certain priviliges.  They are:
  14. '
  15. '     1. You may compile, use, or modify this program in any way you choose
  16. '        provided you do not sell or give away the source code to this prog-
  17. '        ram or any of it's companions to anyone for any reason.  You may,
  18. '        however, sell the resulting executable program as you see fit.
  19. '
  20. '     2. You may modify, enhance or change these programs as you see fit. I
  21. '        as that you keep a copy of the original code and that you notify
  22. '        me of any improvements you make.  I like to think that the code is
  23. '        bug free and cannot be improved upon, but I'm sure someone will
  24. '        find a way to make it better.  If it's you, I'm looking forward to
  25. '        seeing your changes.  I can be reached at:
  26. '
  27. '              Tim Beck                      Tim Beck (C/O Debbie Beck)
  28. '              19419 Franz Road              8030 Fairchild Avenue
  29. '              Houston, Texas  77084         Canoga Park, California 91306
  30. '              (713) 639-3079                (818) 998-0588
  31. '
  32. '     3. This code has been tested and re-tested in a variety of applications
  33. '        and although I have not found any bugs, doesn't mean none exist. So,
  34. '        this program along with it's companions comes with NO WARRANTY,
  35. '        either expressed or implied.  I'm sorry if there are problems, but
  36. '        I can't be responsible for your work.  I've tried to provide a safe
  37. '        and efficient programming enviroment and I hope you find it helpful
  38. '        for you.  I do, however, need to cover my butt!
  39. '
  40. '  I have enjoyed creating this library of programs and have found them to be
  41. '  a great time saver.  I hope you agree.
  42. '
  43. '                                                            Tim Beck //
  44. '
  45. '****************************************************************************
  46.    DECLARE SUB LITDATE (Indate$, Outdate$)
  47.  
  48.    '-----------------------------------------------------------------------
  49.    '  Returns the date in Literary Format (January 1, 1990)
  50.    '
  51.    '  Indate$     = Current Date in YYMMDD Format
  52.    '  OutDate$    = Current Date in Literary Format
  53.  
  54.  
  55.    REM $INCLUDE: 'STDCOM.INC'
  56.  
  57.    TIMER OFF    'Enables Event Trapping
  58.  
  59. '  ON ERROR GOTO ErrorTrap
  60.  
  61. ErrorTrap:
  62.  
  63. '  RESUME
  64.  
  65. SUB LITDATE (Indate$, Outdate$) STATIC
  66.  
  67.    IF MID$(Indate$, 5, 1) = "0" THEN
  68.       DD$ = " " + RIGHT$(Indate$, 1)
  69.    ELSE
  70.       DD$ = " " + RIGHT$(Indate$, 2)
  71.    END IF
  72.   
  73.    IF MID$(Indate$, 3, 2) = "01" THEN
  74.       Outdate$ = "January" + DD$
  75.    ELSEIF MID$(Indate$, 3, 2) = "02" THEN
  76.       Outdate$ = "February" + DD$
  77.    ELSEIF MID$(Indate$, 3, 2) = "03" THEN
  78.       Outdate$ = "March" + DD$
  79.    ELSEIF MID$(Indate$, 3, 2) = "04" THEN
  80.       Outdate$ = "April" + DD$
  81.    ELSEIF MID$(Indate$, 3, 2) = "05" THEN
  82.       Outdate$ = "May" + DD$
  83.    ELSEIF MID$(Indate$, 3, 2) = "06" THEN
  84.       Outdate$ = "June" + DD$
  85.    ELSEIF MID$(Indate$, 3, 2) = "07" THEN
  86.       Outdate$ = "July" + DD$
  87.    ELSEIF MID$(Indate$, 3, 2) = "08" THEN
  88.       Outdate$ = "August" + DD$
  89.    ELSEIF MID$(Indate$, 3, 2) = "09" THEN
  90.       Outdate$ = "September" + DD$
  91.    ELSEIF MID$(Indate$, 3, 2) = "10" THEN
  92.       Outdate$ = "October" + DD$
  93.    ELSEIF MID$(Indate$, 3, 2) = "11" THEN
  94.       Outdate$ = "November" + DD$
  95.    ELSEIF MID$(Indate$, 3, 2) = "12" THEN
  96.       Outdate$ = "December" + DD$
  97.    END IF
  98.   
  99. END SUB
  100.  
  101.