Skip to content

Instantly share code, notes, and snippets.

@ericvanjohnson
Created June 16, 2015 21:51
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 ericvanjohnson/b269638d273d0f569c52 to your computer and use it in GitHub Desktop.
Save ericvanjohnson/b269638d273d0f569c52 to your computer and use it in GitHub Desktop.
<?php
use Carbon\Carbon;
// User passes in start and end dates as YYYY-MM-DD .. Example 2015-06-16
// Get the beginning of the day timestamp
$start = Carbon::parse($this->option('start'))->startOfDay()->timestamp;
// Get the end of the day timestamp
$end = Carbon::parse($this->option('end'))->endOfDay()->timestamp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment