Re: Help with dates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jochem Maas wrote:
> ....
>> It's mostly the past. The RPG is set in Egypt and the beginning of the
>> society in egypt has been taken as year 0. The start date I think is
>> obvious, but I do not understand an end date of a calendar.. Perhaps I'm
>> just blond.. but could you perhaps explain that one?
>>
>
> I must be blond, I don't even grok that question :-/
>
> rgds,
> jochem

It comes down to the amount of information that you can store in memory.
 Consider: my start date is 6000 BC.  And I believe that the universe
will end around, say, 320 Quadrillion AD.  And I want accuracy in my
calendar (that is I can convert time) to the nearest second.  Good luck
finding a computer that can easily handle that!  Heck, good luck even
trying to store all of the seconds of the calendar as bytes on the computer!

This problem is related to the Y2K "bug".  Back when hard drive storage
/ memory was more expensive they needed to find ways to express more
information with less technology.  So they traded accuracy for
efficiency and dates were stored with two digits in each year.  It was
ok though because the expected life of the program wasn't supposed to be
beyond 2000.

So getting back to *this* problem... what exactly is the relevant span
of time?  Will game time in the RPG extend for thousands of years?
Hundreds of thousands?  Would it really be ancient Egypt once you make
it past 0 BC?

So decide on an upper limit for the game calendar.  And decide the
accuracy you need (nearest day, etc.) and then you can create functions
that will do the necessary date conversions.  It can be in PHP or in the
DB itself... but that's the next step in the decision process.  :)

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux