get_vitamin_d_window
Find the daily vitamin D synthesis window: when UV index ≥3, the best hour, and clear-sky minutes needed for your target IU, considering your skin type and location.
Instructions
The solar vitamin D synthesis window for ONE specific day at a location, for a personal profile: when UV is strong enough (index ≥ 3), the best hour, the clear-sky minutes needed to reach the target IU, and (with atTime) the minutes at the specific hour the user plans to go out. Returns synthesisPossible=false when the sun never gets high enough that day. Only for single-day questions — for months, seasons or 'when during the year', call get_vitamin_d_year instead of calling this once per date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | No | Age in years (synthesis declines with age); omit for adult baseline | |
| lat | Yes | Latitude in decimal degrees | |
| lon | Yes | Longitude in decimal degrees | |
| date | No | Date as YYYY-MM-DD; defaults to today | |
| atTime | No | Local HH:MM the user plans to go out — adds minutesNeeded and UV at that exact time | |
| skinType | No | Fitzpatrick skin type 1 (very fair) to 6 (very dark); default 3 | |
| targetIU | No | Vitamin D target per session in IU; default 1000 | |
| timezone | No | IANA timezone like 'Europe/Madrid'. Strongly recommended — without it all times are UTC | |
| elevationM | No | Ground elevation in metres (UV rises ~8%/km); default sea level | |
| exposedSkinFraction | No | Skin exposed: 0.10 face+hands, 0.18 face+arms, 0.25 t-shirt+shorts (default), 0.40 swimsuit |