= $this->extend('layout/main_layout') ?> = $this->section('content') ?> modify('+6 days'); $weekEndValue = $dt->format('Y-m-d'); } catch (\Exception $e) { $weekEndValue = ''; } } $weekEndLabel = ''; if ($weekEndValue) { try { $weekEndLabel = (new \DateTime($weekEndValue))->format('M d, Y'); } catch (\Exception $e) { $weekEndLabel = 'Week end'; } } else { $weekEndLabel = 'Select a week'; } ?>