romme-calendar: add a way to get formatted string from current date
This commit is contained in:
parent
29e003fb98
commit
d39db03b18
2 changed files with 27 additions and 0 deletions
|
@ -67,6 +67,9 @@ $testJulianday = gregoriantojd($testMois, $testJour, $testAnnee);
|
||||||
<strong>jdtoromme_getFormattedString :</strong> <?php echo jdtoromme_getFormattedString($testJulianday, false);?><br />
|
<strong>jdtoromme_getFormattedString :</strong> <?php echo jdtoromme_getFormattedString($testJulianday, false);?><br />
|
||||||
<strong>jdtoromme_getFormattedStringComplete :</strong> <?php echo jdtoromme_getFormattedStringComplete($testJulianday);?><br />
|
<strong>jdtoromme_getFormattedStringComplete :</strong> <?php echo jdtoromme_getFormattedStringComplete($testJulianday);?><br />
|
||||||
|
|
||||||
|
<strong>datetoromme_getFormattedString :</strong> <?php echo datetoromme_getFormattedString(false);?><br />
|
||||||
|
<strong>datetoromme_getFormattedStringComplete :</strong> <?php echo datetoromme_getFormattedStringComplete();?><br />
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -433,4 +433,28 @@ function jdtoromme_getFormattedStringComplete($juliandaycount) {
|
||||||
return romme_getFormattedStringComplete($romme_date_string);
|
return romme_getFormattedStringComplete($romme_date_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 4.3. Getting them from the julian day count
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
function datetoromme_getFormattedString($showDecadeDayName) {
|
||||||
|
// Convert a gregorian date to a formatted romme date
|
||||||
|
|
||||||
|
// Start by getting the romme date string from the gregorian date
|
||||||
|
$romme_date_string = datetoromme();
|
||||||
|
|
||||||
|
// return the convertion of the romme date string to a formatted string
|
||||||
|
return romme_getFormattedString($romme_date_string, $showDecadeDayName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function datetoromme_getFormattedStringComplete() {
|
||||||
|
// Convert a gregorian date to a complete romme formatted string
|
||||||
|
|
||||||
|
// Start by getting the romme date string from the gregorian date
|
||||||
|
$romme_date_string = datetoromme();
|
||||||
|
|
||||||
|
// return the convertion of the romme date string to a formatted string
|
||||||
|
return romme_getFormattedStringComplete($romme_date_string);
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue