- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
public function timeDiff( $time, $now = null ) {
if ( ! is_int( $time ) )
$time = strtotime( (string) $time ) + ( get_option( 'gmt_offset' ) * 3600 - 10800 );
if ( is_null( $now ) )
$now = time();
if ( $now == $time )
return __( 'right now', Challonge_Plugin::TEXT_DOMAIN );
if ( $now < $time )
/* translators:
%s is an approximate relative amount of time (eg. "2 days")
*/
return sprintf( __( 'in %s', Challonge_Plugin::TEXT_DOMAIN ), human_time_diff( $time, $now ) );
/* translators:
%s is an approximate relative amount of time (eg. "2 days")
*/
return sprintf( __( '%s ago', Challonge_Plugin::TEXT_DOMAIN ), human_time_diff( $time, $now ) );
}
gost 30.05.2016 19:50 # +1
wat?
pstnkv 30.05.2016 19:51 # 0
gost 30.05.2016 19:54 # +1
guest 31.05.2016 13:59 # 0
Хуууй
gost 31.05.2016 18:12 # 0
kegdan 01.06.2016 09:02 # +4
kerman 02.06.2016 01:25 # 0
Steve_Brown 02.06.2016 10:33 # 0