Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / day of the week in DB

Author
Message
TESLA
21
Years of Service
User Offline
Joined: 12th Jul 2003
Location:
Posted: 12th Jul 2003 16:39
I know a fair bit about 3d and 2d shit.. but how do you display the current day of the week from get date$() ???
Sat, Sun, Mon e.t.c...

I think the Linux way was to count the minutes from a specified date ?? driving me nutz..................
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 12th Jul 2003 17:46
You'll have to write your own code to work it out from the year and day and month. I'll try, just give me a bit of time.

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Eric T
22
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 12th Jul 2003 18:58 Edited at: 12th Jul 2003 18:59
&*(EDIT)@#$ (wrong DB)

Opinions are like a$$holes, Everybody has one.
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 12th Jul 2003 19:06
@Hamish & TESLA

This may be of some use to you:
http://quasar.as.utexas.edu/BillInfo/doomsday.html

"All programmers are playwrites and all computers are lousy actors" -Anon
TESLA
21
Years of Service
User Offline
Joined: 12th Jul 2003
Location:
Posted: 12th Jul 2003 20:19
thx.. andrew for info, will try. I have a 6 line code for the fibonacci sequence if any1 is interested.

Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 12th Jul 2003 21:05
I got there with my day calculator, I just got stuck at doing the extra days on leap years.

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 13th Jul 2003 06:40 Edited at: 13th Jul 2003 06:41
You can use this code to find out if it was a leap year.

If int(year/4) = (year/4) Then leapyear = 1

Each day of the week is moved over one each year. If it is a leap year, you move the day if after Feb 29 two intead of one.

for example

normal year:
year1 = monday
year2 = tuesday

leap year
year1 = monday
year2 = wednesday

Easier said than done though

"All programmers are playwrites and all computers are lousy actors" -Anon

Login to post a reply

Server time is: 2025-05-19 13:18:29
Your offset time is: 2025-05-19 13:18:29