[wp-trac] [WordPress Trac] #9272: Expand human_time_diff()'s abilities

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 9 19:33:25 UTC 2012


#9272: Expand human_time_diff()'s abilities
-------------------------------------------------+-------------------------
 Reporter:  Viper007Bond                         |       Owner:
     Type:  enhancement                          |  Viper007Bond
 Priority:  normal                               |      Status:  new
Component:  Date/Time                            |   Milestone:  Future
 Severity:  normal                               |  Release
 Keywords:  has-patch needs-testing rtl-         |     Version:  2.8
  feedback                                       |  Resolution:
-------------------------------------------------+-------------------------

Comment (by Viper007Bond):

 Replying to [comment:34 westi]:
 > This gives us a simpler external API, a simpler handler function because
 it gets the labels to use passed in and they can live in the calling
 functions, an easy to extend function if you want to use it in another
 context.

 Can you explain your preference for having all of the code live in a
 helper function and `human_time_diff()` becoming a wrapper for it? Is it
 to avoid the legacy argument code at the top of my patch or something
 else?

 > We also need a more correct way to handle RTL than array_reversing and
 crossing our fingers :)

 Which is why my patch has the "rtl-feedback" tag. ;)

 > Rather than taking an array of labels we should probably have an array
 of variants e.g:
 >
 >  * %d days, %d seconds ago
 >  * %d hours, %d seconds ago
 >
 > This gives translators full control.

 This would be a very, very long list of combinations, plus doubling it for
 context.

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


More information about the wp-trac mailing list