[wp-trac] [WordPress Trac] #29849: Better human_time_diff()

WordPress Trac noreply at wordpress.org
Fri Oct 3 10:54:42 UTC 2014


#29849: Better human_time_diff()
--------------------------+-----------------------------
 Reporter:  kovshenin     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Given #9272 #18495 and #27271 I think it's time for a better alternative
 to `human_time_diff()`. My proposal is an entirely new function which:

 * Should be simple - no bazillion-dimensional arrays for arguments
 * Should not lack context in translatable strings - "from now", "ago"
 should be part of the resulting strings
 * Should have consistent strings, no abbreviations such as mins, yrs, hrs,
 secs
 * Should assume all timestamps have no offsets

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


More information about the wp-trac mailing list