Programming a calendar system
|From:||Carsten Becker <post@...>|
|Date:||Wednesday, April 28, 2004, 12:07|
From: "Sylvia Sotomayor" <kelen@...>
Sent: Sunday, April 25, 2004 10:55 PM
Subject: Re: Programming a calendar system (WAS: Re: I Should've Been
> OK, Here's the PHP for the Kelen calendar.
Very nice! Thank you. Your script is awesome!
> Holler if you have questions.
I do so:
> #64 Kelen seconds (ilin) make up an usin.
> $kusn = $ksecs/64;
> $ilin = $ksecs%64;
What are the normal division and the modulo division good for? And what
would I have to write when 72 seconds ($asec) are 1 minute ($amin)?
> #Our planet is arbitrarily 1.45 au's away from a F8 star
> $krev = round(sqrt(pow(1.45,3))*(365.24*24*60*60))/(1.5*64*12*8*12);
> $kyr = $klon/$krev;
> $lonj = $klon%$krev;
Why is it so important that the planet is "arbitrarily 1.45 au's away
from a F8 star"? Or is this just the section where the length of the
year is dealt with? SQRT of the 3rd power of 1.45 etc. looks very much
like one of Kepler's laws ... Not caring about any astronomical law I
set 6 days = 1 week, averagely 25,333... days = 1 month, 18 months = 1
year and 1 year = 456,25 days. Every 4th year one day is dropped.
> #Since in unix, the second count began on Jan 1, 1970,
> #we will add an arbitrary 940 revolutions to the year.
> #And we'll floor it to see which year we're in.
> $year = floor(940 + $kyr);
Linux counts from 1/1/1970 that's clear, but what are those "arbitrary
940 revolutions" for? Is it because the calendar has its starting point
in 1030 AD?
Class test: Si on pouvait apprendre le français en dormant, ...
I wrote: ... des générations d'élèves ne se revailleraient plus.
My website: http://www.beckerscarsten.de/
My portfolio: http://gitarrenklampfer.deviantart.com/gallery/