>> conceptually a None makes sense - when there is no next rise/set the value 
>> is None
That is not the case here.  There is a next rise/set.

> On Jan 20, 2026, at 3:32 AM, matthew wall <[email protected]> wrote:
> 
> john,
> 
> thank you for handling forecast issue.  i created that monster, and there are 
> many things i would like to do to extend and modularize it.  unfortunately my 
> work is demanding far too much of my time right now.
> 
> conceptually a None makes sense - when there is no next rise/set the value is 
> None.  but having None as a possible value means that any code that renders 
> or compares or whatever has to deal with None.  in the cheetahgenerator we 
> made simple wrappers to_int, to_bool, etc.
> 
> m
> 
>> On Jan 20, 2026, at 01:05, 'John Kline' via weewx-user 
>> <[email protected]> wrote:
>> 
>> I’d prefer not to spend a lot of time on the forecast module.  I got stuck 
>> with it because I ported it to WeeWX 4 and others asked me to share.  I 
>> don’t actually use the forecast module myself.  I haven’t complained before 
>> about keeping forecast running, but having to deal with users installing an 
>> extension, being pushed on this list, that returns None for the next 
>> rise/set certainly has me annoyed.
>> 
>>>> On Jan 19, 2026, at 9:54 PM, Karen K <[email protected]> wrote:
>>> 
>>> John Kline schrieb am Dienstag, 20. Januar 2026 um 02:48:24 UTC+1:
>>> I will put out a forecast that guards against None for sun/moon rise/set.
>>> 
>>> I guess moonrise and moonset will be enough, as the Sun rises and sets 
>>> every day (except polar regions) but the Moon does not.
>>> 
>>> Having said that, do we want None to be returned if the moonset is after 
>>> midnight?
>>> 
>>> As an alternative you could take the timestamp of moonrise and calculate 
>>> the next setting then like 
>>> $almanac(almanac_time=$almanac.moon.rise).moon.next_setting. Then you catch 
>>> moonset after midnight. But what I got from a short glimpse into the code 
>>> of forecast_table.inc the events are filtered there if they are within the 
>>> respective forecast period. A moonset after midnight would be filtered 
>>> there anyway, if I got that right.
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> To view this discussion visit 
>>> https://groups.google.com/d/msgid/weewx-user/ef25c075-2a03-417f-9a4d-50d90ea55bacn%40googlegroups.com.
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/weewx-user/F4463BB2-0036-453C-BBAF-7BFF7F3BC9DB%40johnkline.com.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion visit 
> https://groups.google.com/d/msgid/weewx-user/66BF664C-BF97-4EE8-8A12-9CE2F07223D1%40gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/C6D84A8E-AEB4-4A89-B4B9-40C9D8791F3E%40johnkline.com.

Reply via email to