note 68529 added to ref.calendar
| From: | lsd25 at hotmail dot com | Date: | Mon, 31 Jul 2006 23:53:45 +0000 |
| Subject: | note 68529 added to ref.calendar | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115384@lists.php.net to get a copy of this message | ||
Here are the variables for the latin calendar the decom needs a little more work i think; but if you
know anything about the shadows of yourself in your own footfall then you will know there randoms
are not random.. Nanosound is great isn't it.
function LatinMonthNames($timeseed)
{
//SEGMENT 1.0
$arSeg1 = array("Ianuarius",
"Februarius",
"Martius",
"Aprilis",
"Maius",
"Iunius",
"Iulius",
"Augustus",
"October",
"Messidor",
"November",
"December") ;
//SEGMENT 2.0
$arSeg2 = array("Ianuariis",
"Februariis",
"Martiis",
"Aprilibus",
"Maiis",
"Iuniis",
"Iuliis",
"Augustis",
"Septembribus",
"Octobribus",
"Novembribus",
"Decembribus") ;
//SEGMENT 3.0
$arSeg3 = array("Ianuarias",
"Februarias",
"Martias",
"Apriles",
"Maias",
"Iunias",
"Iulias",
"Augustas",
"Septembres",
"Octobres",
"Novembres",
"Decembres") ;
if ((date('L',$timeseed))==1){
return $arSeg3[(date('n',$timeseed))-1];
} else {
if (rand(1,2) == 1) {
return $arSeg2[(date('n',$timeseed))-1];
} else {
return $arSeg1[(date('n',$timeseed))-1];
}
}
}
function decrom($dec){
$digits=array(
1 => "I",
4 => "IV",
5 => "V",
9 => "IX",
10 => "X",
40 => "XL",
50 => "L",
90 => "XC",
100 => "C",
400 => "CD",
500 => "D",
900 => "CM",
1000 => "M"
);
krsort($digits);
$retval="";
foreach($digits as $key => $value){
while($dec>=$key){
$dec-=$key;
$retval.=$value;
}
}
$tg =substr($retval,1);
$ty = str_replace($tg,$tg.$tg,$retval);
if ($tg=substr($ty,1)){
return $ty;
} else {
return $tg.$ty;
}
}
function GetLatinDate($timeseed) {
return decrom((date('yyyy'))) . ' of year ' . LatinMonthNames($timeseed) .
' in day ' . decrom((date('t')));
}
?>
----
Server IP: 203.220.0.234
Probable Submitter: 125.253.12.143
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.calendar.php
Edit -- https://master.php.net/note/edit/68529
Del: integrated -- https://master.php.net/note/delete/68529/integrated
Del: useless -- https://master.php.net/note/delete/68529/useless
Del: bad code -- https://master.php.net/note/delete/68529/bad+code
Del: spam -- https://master.php.net/note/delete/68529/spam
Del: non-english -- https://master.php.net/note/delete/68529/non-english
Del: in docs -- https://master.php.net/note/delete/68529/in+docs
Del: other reasons-- https://master.php.net/note/delete/68529
Reject -- https://master.php.net/note/reject/68529
Search -- https://master.php.net/manage/user-notes.php