Day of the week

new BookmarkLockedFalling
turbov21
Guest

Guest Avatar

Chris Iverson
Junior Member
**

Chris Iverson Avatar

There are many worlds, but they all share the same sky. One sky, one destiny.
Posts: 73

I got RBP working over the internet![br][br]http://cssource.servegame.org/rb[br][br]If the server's up you'll see my crappy placeholder webpage!
carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

Post by carlgundel on Nov 10, 2007 12:16:09 GMT -5

thedarkfreak said:
Add a val() around DATE$(dt$) and it appears to work. Gives the same value LB does, at least.

The following also works, but clearly I still have a little work to do with the date$() function. It's a special case (a hack ;-), being the only function that can return either a number or a string.
a = date$("10/1/1998")
PRINT dayname$(a)

FUNCTION dayname$(dt)
days$ = "Tuesday Wednesday Thursday Friday Saturday Sunday Monday"
dayname$ = word$(days,ドル(dt MOD 7)+1)
END FUNCTION

-Carl
turbov21
Guest

Guest Avatar