Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#28698 closed enhancement (invalid)

WP_Date_Query's 'before' and 'after' arguments should support timestamps

Reported by: danielbachhuber's profile danielbachhuber Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords:
Focuses: Cc:

Description

It's silly they don't.

Patch really should have unit tests, but that's blocked in part by #25775

Attachments (1)

28698.1.diff (1.8 KB) - added by danielbachhuber 11 years ago.

Download all attachments as: .zip

Change History (3)

#1 @mboynes
11 years ago

strtotime() supports timestamps using "@<stamp>" notation, like "@1404169843".

One important consideration with this patch is that there are int values which are valid for strtotime(), e.g. 1200 (which would be for noon today), which it would break.

#2 @danielbachhuber
11 years ago

  • Keywords has-patch needs-unit-tests removed
  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

Eh, let's call this one invalid then. I didn't realize strtotime() supported timestamps.

Note: See TracTickets for help on using tickets.