Skip to main content
added 80 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

YouIf you only want to work with yyyy-mm-dd strings, for example '2014-10-10', you could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

 
'before' => '2014-10-10 + 86399 seconds',

or

 
'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

or

just append '23:59:59' to your yyyy-mm-dd string

to get

'before' => '2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

'before' => '2014-10-10 + 86399 seconds',

or

'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

to get

'before' => '2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

If you only want to work with yyyy-mm-dd strings, for example '2014-10-10', you could do something like:

'before' => '2014-10-10 + 1 day - 1 second',
 
'before' => '2014-10-10 + 86399 seconds',
 
'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

or

just append '23:59:59' to your yyyy-mm-dd string

to get

'before' => '2014-10-10 23:59:59'
added 12 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

'before' => '2014-10-10 + 86399 seconds',

or

'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

to get

'before' => '2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

'before' => '2014-10-10 + 86399 seconds',

or

'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

to get

'2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

'before' => '2014-10-10 + 86399 seconds',

or

'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

to get

'before' => '2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

added 59 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

'before' => '2014-10-10 + 86399 seconds',

or

'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

to get

'2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

to get

'2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

You could do something like:

'before' => '2014-10-10 + 1 day - 1 second',

or

'before' => '2014-10-10 + 86399 seconds',

or

'before' => 'tomorrow 2014-10-10 - 1 second',

'before' => '2014-10-10 tomorrow - 1 second',

to get

'2014-10-10 23:59:59'

if you only want to work with yyyy-mm-dd strings.

Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251
Loading