2018-11-07 15:30:30 +01:00
|
|
|
<?php
|
|
|
|
//
|
2018-11-07 16:54:12 +01:00
|
|
|
// romme_calendar :: exemple.php
|
2018-11-07 15:30:30 +01:00
|
|
|
//
|
|
|
|
// Some exemple to see if everything works in the romme calendar library
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
// On commence par inclure le fichier pour pouvoir convertir la date en calendrier romme
|
|
|
|
|
2018-11-07 16:54:12 +01:00
|
|
|
include("romme-calendar.php");
|
2018-11-07 15:30:30 +01:00
|
|
|
|
|
|
|
$testMois = date('n');
|
|
|
|
$testJour = date('j');
|
|
|
|
$testAnnee = date('Y');
|
|
|
|
|
|
|
|
$testJulianday = gregoriantojd($testMois, $testJour, $testAnnee);
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2018-11-07 16:54:12 +01:00
|
|
|
<title>PHP Romme Republican Calendar exemple</title>
|
2018-11-07 15:30:30 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2018-11-07 16:54:12 +01:00
|
|
|
<h1>PHP Romme Republican Calendar exemples</h1>
|
2018-11-07 15:30:30 +01:00
|
|
|
<h2>Date d'aujourd'hui</h2>
|
|
|
|
<p>
|
|
|
|
<strong>Date utilisée :</strong> <?php echo $testJour;?>/<?php echo $testMois;?>/<?php echo $testAnnee;?><br />
|
|
|
|
<strong>Jour julien :</strong> <?php echo $testJulianday; ?> <br />
|
|
|
|
</p>
|
|
|
|
|
2018-11-07 17:50:18 +01:00
|
|
|
<h2>Getting the "romme date string"</h2>
|
2018-11-07 15:30:30 +01:00
|
|
|
<p>
|
|
|
|
<strong>jdtoromme :</strong> <?php echo jdtoromme( $testJulianday );?> <br />
|
2018-11-07 16:34:43 +01:00
|
|
|
<strong>gregoriantoromme :</strong> <?php echo gregoriantoromme($testMois, $testJour, $testAnnee);?><br />
|
2018-11-09 11:10:25 +01:00
|
|
|
<strong>date_romme :</strong> <?php echo datetoromme();?><br />
|
2018-11-07 17:50:18 +01:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<h2>Getting the month/day/year</h2>
|
|
|
|
<p>
|
|
|
|
<strong>romme_getDay :</strong> <?php echo romme_getDay( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
<strong>romme_getMonth :</strong> <?php echo romme_getMonth( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
<strong>romme_getYear :</strong> <?php echo romme_getYear( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
</p>
|
|
|
|
|
2018-11-08 22:22:23 +01:00
|
|
|
<h2>Getting the month/day/year… names</h2>
|
|
|
|
<p>
|
|
|
|
<strong>romme_getDayName :</strong> <?php echo romme_getDayName( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
<strong>romme_getMonthName :</strong> <?php echo romme_getMonthName( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
<strong>romme_getDayMonthNames :</strong> <?php echo romme_getDayMonthNames( jdtoromme( $testJulianday ), true );?> <br />
|
|
|
|
<strong>romme_getComplementaryDay :</strong> <?php echo romme_getComplementaryDay( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
<strong>romme_getEpiphany :</strong> <?php echo romme_getEpiphany( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
<strong>romme_getComplementaryDayName :</strong> <?php echo romme_getComplementaryDayName( jdtoromme( $testJulianday ) );?> <br />
|
|
|
|
</p>
|
|
|
|
|
2018-11-09 10:38:02 +01:00
|
|
|
<h2>Getting an automated string</h2>
|
2018-11-07 17:50:18 +01:00
|
|
|
<p>
|
2018-11-09 11:02:32 +01:00
|
|
|
<strong>romme_getFormattedString :</strong> <?php echo romme_getFormattedString( jdtoromme( $testJulianday ), false );?> <br />
|
|
|
|
<strong>romme_getFormattedStringComplete :</strong> <?php echo romme_getFormattedStringComplete( jdtoromme( $testJulianday ) );?> <br />
|
2018-11-09 10:38:02 +01:00
|
|
|
|
2018-11-09 11:08:56 +01:00
|
|
|
<strong>gregoriantoromme_getFormattedString :</strong> <?php echo gregoriantoromme_getFormattedString($testMois, $testJour, $testAnnee, false);?><br />
|
|
|
|
<strong>gregoriantoromme_getFormattedStringComplete :</strong> <?php echo gregoriantoromme_getFormattedStringComplete($testMois, $testJour, $testAnnee);?><br />
|
2018-11-07 15:30:30 +01:00
|
|
|
|
2018-11-09 11:15:01 +01:00
|
|
|
<strong>jdtoromme_getFormattedString :</strong> <?php echo jdtoromme_getFormattedString($testJulianday, false);?><br />
|
|
|
|
<strong>jdtoromme_getFormattedStringComplete :</strong> <?php echo jdtoromme_getFormattedStringComplete($testJulianday);?><br />
|
|
|
|
|
2018-11-09 11:19:33 +01:00
|
|
|
<strong>datetoromme_getFormattedString :</strong> <?php echo datetoromme_getFormattedString(false);?><br />
|
|
|
|
<strong>datetoromme_getFormattedStringComplete :</strong> <?php echo datetoromme_getFormattedStringComplete();?><br />
|
|
|
|
|
2018-11-07 15:30:30 +01:00
|
|
|
</p>
|
|
|
|
</body>
|
|
|
|
</html>
|