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.

Geek Culture / Whats the time?

Author
Message
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 24th Oct 2004 21:38
Hello people... i have developed, with a bit of help, a formula to work out how many years have passed since 1st January 1970.

But this brings one problem which i cant figure out. . .which is whats the date and time? its hard for me to work out but here is an example

time_in_seconds = 1098616589


years = time_in_seconds/31471200


(btw 31471200 is derived from
/60 to find number of seconds
/60 to find number of minutes
/24 to find number of days
/364.25 to find numbe of years)


Obviously there are leap years since then:
1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000, 2004

so that needs to be considered when working it out...


Im sure there is some expert here who can work it out...

Cheers,
Rich


(note: if i have actually worked it out [the time and the date] can you tell me cos i cant see what to do)


Create? Play? YOU Decide
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 25th Oct 2004 00:51
heres a excel spreadsheet with infomation on


Create? Play? YOU Decide

Attachments

Login to view attachments
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 25th Oct 2004 01:07
Well, considering its the year 2004, I would say 34 years have passed.

AKA teh great Pet Rat.
Peace sells...but who's buying??
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 25th Oct 2004 01:16
Ok been thinking more.

Changed spreadsheet slighlty.

Im getting there i think. . .

Who knows...



@Benjamin: Yes but you need to work it out with the computer


Create? Play? YOU Decide

Attachments

Login to view attachments
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 25th Oct 2004 01:24
Quote: "Yes but you need to work it out with the computer"


currentYear - 1970 maybe?

AMD Athlon XP2800+
GeForce FX5200 128MB
1.25GB DDR 333MHz RAM
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 25th Oct 2004 02:48
sounds like you need a TimeSpan Object


DBP_NETLIB_v1.4.3 DarkTOPIA site coming soon!
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 25th Oct 2004 03:00
it has to be done mathematically


Create? Play? YOU Decide
Chris K
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 25th Oct 2004 03:46
There's a cool algorithm that works out what day of the week any date was/is/will be.

Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 25th Oct 2004 07:22
Through complex mathematical calculations, I have predicted that the next year will be 2005.


Here we go again!
Whaddaya mean there's no such data type as a flaot?[/i]
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 25th Oct 2004 07:27
really?

no in all seriousness does anybody have any idea how to do it?


Create? Play? YOU Decide
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 25th Oct 2004 07:29
Mouse I don't believe, you next year is...oh wait...

[center]:: Life is a box-plot :: Want Gmail? Email me ::
[center]
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 25th Oct 2004 15:37
the % symbol may come in handy here (modulus)

[center]
Come write!
Yarr join LoGD, and defeat your fellow coders!

Login to post a reply

Server time is: 2024-09-22 22:18:25
Your offset time is: 2024-09-22 22:18:25