Skip to content

Instantly share code, notes, and snippets.

@wrossmann
Last active June 8, 2016 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrossmann/4eab685b3f02b5156154afa5088e8aa5 to your computer and use it in GitHub Desktop.
Save wrossmann/4eab685b3f02b5156154afa5088e8aa5 to your computer and use it in GitHub Desktop.
<?php
$cur = $seconds;
for( $i = count( $this->multipliers ) - 1; $i >= 0; $i -- ) {
$ps = $this->periodSize( $i );
$parts[] = (int) floor( $cur / $ps );
$cur -= $cur - ($cur % $ps);
}
var_dump($parts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment