|
Post by turbov21 on Oct 30, 2007 20:41:58 GMT -5
I was looking through the Liberty BASIC wiki, and found this code. Has anyone tested this to know if it's reliable?
|
|
Chris Iverson
Junior Member
There are many worlds, but they all share the same sky. One sky, one destiny.
Posts: 73
|
Post by Chris Iverson on Nov 10, 2007 11:26:54 GMT -5
Add a val() around DATE$(dt$) and it appears to work. Gives the same value LB does, at least.
|
|
|
Post by carlgundel on Nov 10, 2007 12:16:09 GMT -5
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
|
|
|
Post by turbov21 on Nov 11, 2007 23:49:12 GMT -5
Woot. It works.
|
|