{{-- Weeks + days input for pregnancy measurements. Stored in the usual clinical shorthand "weeks.days" — 3.4 = 3 weeks 4 days (days 0–6) — in the hidden input named $wdName; shown on the print as "3 weeks 4 days". --}} @php $wdV = $wdValue !== null && $wdValue !== '' ? (float) $wdValue : null; $wdW = $wdV !== null ? (int) floor($wdV) : ''; $wdD = $wdV !== null ? min(6, max(0, (int) round(($wdV - floor($wdV)) * 10))) : 0; @endphp