Skip to content

Instantly share code, notes, and snippets.

@blar
Created December 7, 2014 13:58
Show Gist options
  • Save blar/1a9ac456bea9271d1e1d to your computer and use it in GitHub Desktop.
Save blar/1a9ac456bea9271d1e1d to your computer and use it in GitHub Desktop.
Gefälligkeitszeitpunkt
<?php
$due = new DateTime('2014-12-07 12:22:22');
$diff = $due->diff(new DateTime('now'));
var_dump($diff->format('%H:%M:%s'));
string(8) "02:00:42"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment