This is my php class implementation of the terran computational calendar:
		
example_usage.php
<?php

    include_once "TCDate.class.php";

    
/*
    * GET CURRENT DATE and PRINT THE ASSOCIATIVE ARRAY OF THE RESULTING TERRAN CALENDAR DATE:
    */
    
$terran_date tcdate();

    
//prints an associative array
    
print_r($terran_date);

    
//print the date in different ways:
    
echo "\n".tcdateToHTML($terran_date)."\n";
    echo 
$terran_date['padded_date']."\n\n\n";



    
/*
    * CONVERT 2010 UTC WINTER SOLSTICE TO TERRAN CALENDAR DATE
    */

    
$utc_date "2010-12-21 23:38:00 UTC";

    
$delimiter_array = ['-','-',':','--','--',' [a big delimiter] ']; // delimiters in between the units

    
$old_terran_date tcdate($utc_date$delimiter_array);

    
//prints an associative array
    
print_r($old_terran_date);

    echo 
"\n".tcdateToHTML($old_terran_date,$delimiter_array)."\n";



    if (isset(
$footer)) echo $footer;
?>
		
OUTPUT:
Array ( [year] => 52 [month] => 12 [day] => 17 [hour] => 15 [minute] => 7 [second] => 45 [fraction] => 0 [designator] => TC [year_base] => [offset] => 0 [tc_timestamp] => 1671462490 [unix_timestamp] => 1670598465 [is_leap_second] => 0 [datemod] => 0 [date] => 52.12.17,15.7.45 TC [padded_date] => 52-12-17 15:07:45 TC ) 52.12.17,15.7.45 TC 52-12-17 15:07:45 TC Array ( [year] => 40 [month] => 13 [day] => 1 [hour] => 23 [minute] => 38 [second] => 0 [fraction] => 0 [designator] => TC [year_base] => [offset] => 0 [tc_timestamp] => 1293838704 [unix_timestamp] => 1292974680 [is_leap_second] => 0 [datemod] => 0 [date] => 40.13.1,23.38.0 TC [padded_date] => 40-13-01 23:38:00 TC ) 40-13-1:23--38--0 [a big delimiter] TC