Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Date-format/BBC-BASIC/date-format.basic
Normal file
18
Task/Date-format/BBC-BASIC/date-format.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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$
|
||||
Loading…
Add table
Add a link
Reference in a new issue