[wp-trac] [WordPress Trac] #52187: Create function to resolve a post date from post_date and post_date_gmt strings

WordPress Trac noreply at wordpress.org
Tue Dec 29 18:08:01 UTC 2020


#52187: Create function to resolve a post date from post_date and post_date_gmt
strings
----------------------------------------+------------------------------
 Reporter:  jmdodd                      |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Posts, Post Types           |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------
Changes (by jorbin):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 Love this idea. I think automated tests for the new `resolve_post_date`
 function would be very helpful. It's also not obvious at first glance what
 is is meant by `Resolve the mysql-formatted post date from provided date
 and date GMT strings.` I wonder if a longer description might help.
 Perhaps:

 "Uses `wp_checkdate` to verify that the date passed in is a valid
 Gregorian-calendar date string. If no date is given, first attempt to use
 date_gmt otherwise fallback to useing the current time."

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52187#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list