romme-calendar: add date_romme

Add a function to get the romme string from the current date.
This commit is contained in:
Kazhnuz 2018-11-07 17:57:54 +01:00
parent 3b25e412f1
commit d2575b7edb
2 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,7 @@ $testJulianday = gregoriantojd($testMois, $testJour, $testAnnee);
<p>
<strong>jdtoromme :</strong> <?php echo jdtoromme( $testJulianday );?> <br />
<strong>gregoriantoromme :</strong> <?php echo gregoriantoromme($testMois, $testJour, $testAnnee);?><br />
<strong>date_romme :</strong> <?php echo date_romme();?><br />
</p>
<h2>Getting the month/day/year</h2>

View File

@ -118,6 +118,10 @@ function gregoriantoromme($m, $d, $y) {
return $romme_date_string;
}
function date_romme() {
return gregoriantoromme(date('n'), date('j'), date('Y'));
}
/* 2. getting the romme array
These functions report an array instead of the romme string.