Unix Time Stamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$unix = new DateTime(); //Unix Time Stamp (seconds since Jan 01 1970. (UTC)) | |
$unix_ts = $unix->getTimestamp(); | |
$now = $unix_ts - 1420070400; //seconds between Unix Time Stamp and Jan 1 2015(UTC) | |
$y_sui_tot = $now / 766.385574378; //suicide occurs every 766 seconds | |
$f_sui = number_format($y_sui_tot); | |
echo "<h1>Total Suicides in 2015: <br/>".$f_sui."</h1>"; | |
$y_sui_att = 25 * $y_sui_tot; // 25 suicide attempts before fatality | |
$f_att = number_format($y_sui_att); | |
echo "<h1>Suicide Attempts in 2015: <br/>".$f_att."</h1>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment