Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34602 closed enhancement (fixed)

Use the new MONTH_IN_SECONDS constant in human_time_diff()

Reported by: tyxla Owned by: SergeyBiryukov
Priority: normal Milestone: 4.4
Component: Formatting Version: 4.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

#33397 introduces a new constant MONTH_IN_SECONDS, which is defined as 30 * DAY_IN_SECONDS.

The human_time_diff() function uses the month time in its logic as well, and it is also currently using a hardcoded 30 * DAY_IN_SECONDS value for months.

So for consistency we should replace all occurrences of 30 * DAY_IN_SECONDS to MONTH_IN_SECONDS in human_time_diff().

Attachments (1)

34602.patch (994 bytes ) - added by tyxla 11 years ago.
Use the new MONTH_IN_SECONDS constant for the month representation in the human_time_diff() logic.

Download all attachments as: .zip

Change History (5)

@tyxla
11 years ago

Use the new MONTH_IN_SECONDS constant for the month representation in the human_time_diff() logic.

#1 @tyxla
11 years ago

  • Keywords has-patch added

#3 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review4.4
  • Owner set to SergeyBiryukov
  • Status newreviewing

#4 @SergeyBiryukov
11 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 35555:

Use the MONTH_IN_SECONDS constant added in [33698] for the month representation in human_time_diff() logic.

Props tyxla.
Fixes #34602.

Note: See TracTickets for help on using tickets.