@section('site_title', formatTitle([__('Uptime calculator'), __('Tool'), config('settings.title')])) @section('head_content') @endsection @include('shared.breadcrumbs', ['breadcrumbs' => [ ['url' => route('dashboard'), 'title' => __('Home')], ['url' => route('tools'), 'title' => __('Tools')], ['title' => __('Tool')], ]])

{{ __('Uptime calculator') }}

{{ __('Uptime calculator') }}
@include('shared.message')
@cannot('tools', ['App\Models\User'])
@endcannot @csrf
%
@if ($errors->has('percentage')) {{ $errors->first('percentage') }} @endif
@cannot('tools', ['App\Models\User'])
@if(paymentProcessors()) @include('shared.features.locked') @else @include('shared.features.unavailable') @endif
@endcannot
@if(isset($result))
{{ __('Results') }}
{{ __('Period') }}
{{ __('Uptime') }}
{{ __('Downtime') }}
@foreach([__('Day') => 86400, __('Week') => 86400 * 7, __('Month') => 86400 * 30, __('Year') => 86400 * 365] as $key => $value)
{{ $key }}
{{ (clone $now)->diffForHumans((clone $now)->subSeconds(round(($value / 100) * $percentage)), ['syntax' => true, 'parts' => 3, 'join' => true, 'short' => true]) }}
{{ (clone $now)->diffForHumans((clone $now)->subSeconds(round(($value / 100) * (100-$percentage))), ['syntax' => true, 'parts' => 3, 'join' => true, 'short' => true]) }}
@endforeach
@endif