1. PHP / Говнокод #20100

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 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 ) );
    	}

    -10800
    починил блять!

    Запостил: pstnkv, 30 Мая 2016

    Комментарии (8) RSS

    Добавить комментарий