@php $format = 'd/m/Y'; $week_number = ['日','一','二','三','四','五','六']; $start_date = \Carbon\Carbon::parse($start_date); $start_date_week_number = $week_number[$start_date->format('w')]; if($end_date){ $end_date = \Carbon\Carbon::parse($end_date); $end_date_week_number = $week_number[$end_date->format('w')]; } @endphp @if (empty($end_date)) {{ $start_date->format($format.' g:i A')."($start_date_week_number)" }} @else @if ($start_date->format('Ymd') == $end_date->format('Ymd')) @if ($start_date->format('Hi') == $end_date->format('Hi')) {{ $start_date->format($format.' g:i A')."($start_date_week_number)" }} @else {{ $start_date->format($format)."($start_date_week_number)" }}
{{ $start_date->format('g:i A') . ' 至 ' . $end_date->format('g:i A') }}
@endif @else {{ $start_date->format($format.' g:i A')."($start_date_week_number)" . ' 至 ' . $end_date->format($format.' g:i A')."($end_date_week_number)" }} @endif @if (!empty($data->date_remark)){{ $data->date_remark }}
@endif @endif