From 42984e355bc9db48dc897eefbbe22f225d04a079 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 14 Apr 2026 03:17:16 +0200 Subject: [PATCH] Growth chart: flexible age input with smart parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace [years] + [months dropdown] with a single text field that accepts: 3y / 3 years / 3 yr 29m / 29 months / 29 mo 2y5m / 2 years 5 months / 2 yr 5 mo 3.5 years / 36 (plain number = months) 15 days / 2 weeks / 3y 2m 10d Enables fractional ages so newborns can be plotted accurately (WHO/CDC growth curves are continuous — "0 months" means at birth, not a 0-27 day bucket, so a 15-day-old should plot at ~0.5 months). Live hint below the field shows how the input was interpreted ("= 2 yr 5 mo (29 mo total)"). --- public/components/calculators.html | 10 +---- public/js/calculators.js | 71 +++++++++++++++++++++++++++--- 2 files changed, 67 insertions(+), 14 deletions(-) diff --git a/public/components/calculators.html b/public/components/calculators.html index 95fc3be..ce01aa9 100644 --- a/public/components/calculators.html +++ b/public/components/calculators.html @@ -216,14 +216,8 @@
-
- - -
+ +