title: Timestamp Maths, percentages
body: <p>I'm trying to work out a simple algorithm to get a percentage of how far the current time is, in-between two timestamps. (this is confusing to write so probably confusing to read, sorry)</p>
  
  <p>I'm using PHP and Unix timestamps "time()"</p>
  
  <p>So far I've got, </p>
  
  <pre><code>$percentCompleted = ((time() - $startTimestamp) / $endTimestamp) * 100;
  </code></pre>
  
  <p>Any ideas? </p>