[wp-trac] [WordPress Trac] #24781: Deprecate the_weekday() and the_weekday_date()

WordPress Trac noreply at wordpress.org
Wed Jul 17 04:33:39 UTC 2013


#24781: Deprecate the_weekday() and the_weekday_date()
--------------------------+------------------------------
 Reporter:  DrewAPicture  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by DrewAPicture):

 At first glance, I thought they were the only way to retrieve the
 localized day names because they use `WP_Local::get_weekday()`.

 Turns out the `$translate` parameter in `mysql2date()` defaults to true,
 which means `get_the_date()` and in turn `the_date()` output localized
 values. Therefore `the_weekday()` is the same as `the_date( 'l' )`.

 On that same token, I'm not sure which global @nacin was referring to in
 `the_weekday_date()`, but I can't quite figure out what its purpose is in
 relation to `the_weekday()` — to not display the current post's day if
 it's different from the previous one? Is that the previous post's day?
 Why?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24781#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list