0 ? sprintf( __( 'HTTP %d', 'aftercare' ), (int) $value ) : __( 'no response', 'aftercare' ); case 'CLS': return number_format_i18n( $value, 3 ); case 'LCP': case 'TTFB': return number_format_i18n( $value / 1000, 2 ) . ' s'; default: return number_format_i18n( $value, 0 ) . ' ms'; } } /** * Current time in GMT, MySQL format. */ public static function now(): string { return current_time( 'mysql', true ); } /** * GMT date string N days ago (Y-m-d). */ public static function days_ago( int $days ): string { return gmdate( 'Y-m-d', time() - $days * DAY_IN_SECONDS ); } }