HI there,
when requesting the daily forecast via the WeatherKit REST API, I found out that under certain circumstances the moon phase full is skipped.
Example from Japan (working):
{
"forecastDaily": {
"name": "DailyForecast",
"metadata": {
"attributionURL": "https://developer.apple.com/weatherkit/data-source-attribution/",
"expireTime": "2024-10-21T15:16:10Z",
"latitude": 35.650,
"longitude": 139.840,
"readTime": "2024-10-21T14:16:10Z",
"reportedTime": "2024-10-21T12:00:37Z",
"units": "m",
"version": 1,
"sourceType": "modeled"
},
"days": [
...,
{
"forecastStart": "2024-10-16T15:00:00Z",
"forecastEnd": "2024-10-17T15:00:00Z",
"conditionCode": "MostlyCloudy",
"maxUvIndex": 4,
"moonPhase": "waxingGibbous",
"moonrise": "2024-10-17T07:47:26Z",
"moonset": "2024-10-16T20:09:01Z",
"precipitationAmount": 0.09,
"precipitationChance": 0.43,
"precipitationType": "rain",
...
"windSpeedMax": 16.03,
},
{
"forecastStart": "2024-10-17T15:00:00Z",
"forecastEnd": "2024-10-18T15:00:00Z",
"conditionCode": "Rain",
"maxUvIndex": 4,
"moonPhase": "full",
"moonrise": "2024-10-18T08:20:34Z",
"moonset": "2024-10-17T21:24:49Z",
"precipitationAmount": 4.83,
"precipitationChance": 0.83,
"precipitationType": "rain",
...
"windSpeedMax": 15.57,
},
{
"forecastStart": "2024-10-18T15:00:00Z",
"forecastEnd": "2024-10-19T15:00:00Z",
"conditionCode": "Drizzle",
"maxUvIndex": 5,
"moonPhase": "waningGibbous",
"moonrise": "2024-10-19T08:58:43Z",
"moonset": "2024-10-18T22:42:03Z",
"precipitationAmount": 3.85,
"precipitationChance": 0.76,
...
"windSpeedMax": 28.81,
},
...
]
}
}
Example from Germany where the fullmoon is skipped:
{
"forecastDaily": {
"name": "DailyForecast",
"metadata": {
"attributionURL": "https://developer.apple.com/weatherkit/data-source-attribution/",
"expireTime": "2024-10-21T15:41:17Z",
"latitude": 47.760,
"longitude": 12.650,
"readTime": "2024-10-21T14:41:17Z",
"reportedTime": "2024-10-21T13:00:37Z",
"units": "m",
"version": 1,
"sourceType": "modeled"
},
"days": [
{
"forecastStart": "2024-10-16T22:00:00Z",
"forecastEnd": "2024-10-17T22:00:00Z",
"conditionCode": "MostlyClear",
"maxUvIndex": 3,
"moonPhase": "waxingGibbous",
"moonrise": "2024-10-17T16:07:30Z",
"moonset": "2024-10-17T05:19:30Z",
"precipitationAmount": 0.0,
...
"windSpeedMax": 8.23,
},
{
"forecastStart": "2024-10-17T22:00:00Z",
"forecastEnd": "2024-10-18T22:00:00Z",
"conditionCode": "Cloudy",
"maxUvIndex": 2,
"moonPhase": "waningGibbous",
"moonrise": "2024-10-18T16:30:22Z",
"moonset": "2024-10-18T06:48:39Z",
"precipitationAmount": 1.17,
...
"windSpeedMax": 8.73,
},
{
"forecastStart": "2024-10-18T22:00:00Z",
"forecastEnd": "2024-10-19T22:00:00Z",
"conditionCode": "Cloudy",
"maxUvIndex": 2,
"moonPhase": "waningGibbous",
"moonrise": "2024-10-19T16:59:14Z",
"moonset": "2024-10-19T08:18:33Z",
"precipitationAmount": 0.02,
...
"windSpeedMax": 7.16,
},
]
}
}
As you can see here https://moon.nasa.gov/moon-observation/daily-moon-guide/?intent=011#1729171951907::0:: and on several other sites specialized on the lunar cycle) on 2024-10-17 should be shown full moon.
I know this error is probably because the forecast starts prior to the full moon phase and ends after it but customers don't care about technicalities. They see that there is a full moon missing and complain to me. And they are right. Can you fix this somehow? For example, if a DailyForecast spans the majority of a full moon this Day is marked as full moon.
Another question: Are you considering providing a moonPhase attribute to the "currentWeather" dataset? That would be the best option. (At least for me :))