[wp-trac] [WordPress Trac] #34602: Use the new MONTH_IN_SECONDS constant in human_time_diff()

WordPress Trac noreply at wordpress.org
Fri Nov 6 15:19:38 UTC 2015


#34602: Use the new MONTH_IN_SECONDS constant in human_time_diff()
-------------------------+-----------------------------
 Reporter:  tyxla        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Formatting   |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 #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()`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34602>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list