Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#47354 closed defect (bug) (fixed)

the_weekday_date() should use is_new_day()

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Date/Time Keywords:
Focuses: Cc:

Description

Background: #33750, #46627.

Since [34474], the_date() uses is_new_day() instead of directly comparing $currentday and $previousday globals.

the_weekday_date() should do the same for consistency.

Change History (3)

#1 @SergeyBiryukov
6 years ago

In 45377:

Docs: Improve documentation for the_date() and the_weekday_date().

Correct type for $currentday and $previousday globals.

See #47354, #47110.

#2 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 45378:

Date/Time: Bring some consistency to the_date() and the_weekday_date():

  • Make the_date() always apply the the filter and return a value.
  • Use is_new_day() in the_weekday_date().
  • Add a unit test for the_weekday_date().

Fixes #47354.

#3 @SergeyBiryukov
6 years ago

In 45379:

Date/Time: Return early from the_weekday() and the_weekday_date() if we're not in the loop.

Restore $previousweekday global usage in the_weekday_date(), so it could still be used simultaneously with the_date().

Partially reverts [45378].
See #47354.

Note: See TracTickets for help on using tickets.