[wp-trac] [WordPress Trac] #28636: Add functions for working with local dates and times

WordPress Trac noreply at wordpress.org
Thu Aug 29 11:35:53 UTC 2019


#28636: Add functions for working with local dates and times
-------------------------+-----------------------------
 Reporter:  mboynes      |       Owner:  SergeyBiryukov
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  5.3
Component:  Date/Time    |     Version:  2.9
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------------

Comment (by Rarst):

 Actually, no, while `date_i18n()` does behave like this, `date()` does
 not. It would return `false` on invalid timestamp input.

 I am not sure what is preferable here:

 1. Have `date_i18n()` and `wp_date()` both return current time for invalid
 input.
 2. Have `date_i18n()` return current time, but `wp_date()` return `false`
 for invalid input.

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


More information about the wp-trac mailing list