This task has been clarified. Its programming examples are in need of review to ensure that they still fit the requirements of the task.


Task

Display the   current date   in the formats of:

   2007-11-23     and 
   Friday, November 23, 2007


      daysow$ = "Sunday    Monday    Tuesday   Wednesday Thursday  Friday    Saturday"
      months$ = "January   February  March     April     May       June      " + \
      \         "July      August    September October   November  December"
 
      date$ = TIME$
      dayow% = (INSTR(daysow$, MID$(date$,1,3)) + 9) DIV 10
      month% = (INSTR(months$, MID$(date$,8,3)) + 9) DIV 10
 
      PRINT MID$(date$,12,4) "-" RIGHT$("0"+STR$month%,2) + "-" + MID$(date$,5,2)
 
      PRINT FNrtrim(MID$(daysow$, dayow%*10-9, 10)) ", " ;
      PRINT FNrtrim(MID$(months$, month%*10-9, 10)) " " ;
      PRINT MID$(date$,5,2) ", " MID$(date$,12,4)
      END
 
      DEF FNrtrim(A$)
      WHILE RIGHT$(A$) = " " A$ = LEFT$(A$) : ENDWHILE
      = A$