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


dim n$(1)
 
n = token(date$, n$(), "-")
 
print n$(4), "-", n$(2), "-", n$(3)
print nDay$(n$(5)), ", ", nMonth$(n$(6)), " ", n$(3), ", ", n$(4)
 
sub nDay$(n$)
	switch n$
	case "Mon": case "Fri": case "Sun": break
	case "Tue": n$ = n$ + "s" : break
	case "Wed": n$ = n$ + "nes" : break
	case "Thu": n$ = n$ + "rs" : break
	case "Sat": n$ = n$ + "ur" : break
	default: n$ = "none" : break
	end switch
 
	return n$ + "day"
end sub
 
sub nMonth$(n$)
	local month$(1), n
 
	n = token("January, February, March, April, May, June, July, August, September, October, November, December", month$(), ", ")
	n = instr("JanFebMarAprMayJunJulAugSepOctNovDec", n$)
 
	return month$(int(n/3) + 1)
end sub