diff options
| author | Horus3 | 2015-12-04 22:32:45 +0100 |
|---|---|---|
| committer | Horus3 | 2015-12-04 22:32:45 +0100 |
| commit | a88b4670fe353f07095e66e17d2328324c13cb09 (patch) | |
| tree | 331d59a5b3ba55de65b268fe539cc0e56bb6efda | |
| parent | aea6024d1bf3d3d42a6778de12d730adf4de114b (diff) | |
| download | dotfiles-a88b4670fe353f07095e66e17d2328324c13cb09.tar.gz | |
Rechnet in franzi.php nun auch in Jahren.
| -rw-r--r-- | php/franzi.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/php/franzi.php b/php/franzi.php index fb95c2d..20093ea 100644 --- a/php/franzi.php +++ b/php/franzi.php @@ -6,11 +6,15 @@ $now=time(); $secs = $now - $time; +$years = (int) ($secs / 31536000); // == 1 jahr + +$secs = $secs - ($years * 31536000); + $now = date_create('now', new DateTimeZone('GMT')); $here = clone $now; $here->modify($secs.' seconds'); $diff = $now->diff($here); -$body = $diff->format('Wir sind %a Tage, %h Stunde, %i Minuten und %s Sekunden zusammen.'); -mail("fnetzband@googlemail.com", "Timestamp duration relationship", $body, "From: Liebling <max-moehring@web.de>\r\n"); +$body = $diff->format('Wir sind '.$years.' Jahr, %a Tage, %h Stunde, %i Minuten und %s Sekunden zusammen.'); +mail("fnetzband@iamfabulous.de", "Timestamp duration relationship", $body, "From: Liebling <max-moehring@web.de>\r\n"); |
