Skip to content

Instantly share code, notes, and snippets.

View coatesap's full-sized avatar

Andy Coates coatesap

View GitHub Profile
@coatesap
coatesap / keybase.md
Created May 18, 2016 08:16
keybase.md

Keybase proof

I hereby claim:

  • I am coatesap on github.
  • I am coatesap (https://keybase.io/coatesap) on keybase.
  • I have a public key whose fingerprint is 1D34 DBCD 2F10 5DC6 D39D 9088 4E0B 9187 90E5 3007

To claim this, I am signing this object:

@coatesap
coatesap / generate
Created July 30, 2013 11:43
Generate a time period range in PHP
$start_time = '11:00';
$end_time = '13:00';
$interval_minutes = 15;
$start = new DateTime();
list($h, $m) = explode(':', $start_time);
$start->setTime($h, $m);
$end = new DateTime();
list($h, $m) = explode(':', $end_time);