Visually separate the different tests for easier viewing.

master
YandolsZX 3 years ago
parent ffba1a9d02
commit 54d0c3ba68
  1. 12
      index.php

@ -1,22 +1,31 @@
<h1>Rocknarok Multiverse Time Clock</h1>
<?php <?php
//Settings here //Settings here
//Mechanisms here //Mechanisms here
// Testing // Testing
echo "Test #1: <br/>";
$now = new DateTime(); $now = new DateTime();
$zero = new DateTime('1442-01-01'); $zero = new DateTime('1442-01-01');
$diff = $now->diff($zero); $diff = $now->diff($zero);
echo $diff->format('%a days'); // days since day zero echo $diff->format('%a days'); // days since day zero
echo "<br/>"; //separator echo "<br/><br/>"; //separator
echo "Test #2: <br/>";
$year = date("Y") - 579; $year = date("Y") - 579;
$month = date("M") - 6; $month = date("M") - 6;
$day = date("d") - 12; $day = date("d") - 12;
// test sample date // test sample date
echo "Year: " . $year . " Month: " . $month . " Day: " . $day . "<br/>"; echo "Year: " . $year . " Month: " . $month . " Day: " . $day . "<br/>";
echo "<br/><br/>"; //separator
// Test 3 with idea based on ahk version of RMT, not sure if actually works in PHP // Test 3 with idea based on ahk version of RMT, not sure if actually works in PHP
echo "Test #3: <br/>";
$testdate=date_create(); $testdate=date_create();
date_add($testdate,date_interval_create_from_date_string("-579 years")); date_add($testdate,date_interval_create_from_date_string("-579 years"));
@ -27,6 +36,7 @@ date_add($testdate,date_interval_create_from_date_string("17 minutes"));
date_add($testdate,date_interval_create_from_date_string("6 seconds")); date_add($testdate,date_interval_create_from_date_string("6 seconds"));
echo date_format($testdate,"Y/m/d H:i:s"); echo date_format($testdate,"Y/m/d H:i:s");
echo "<br/><br/>"; //separator
?> ?>
Placeholder. Placeholder.

Loading…
Cancel
Save