So I show "On this day" for the previous years on my site. I'll need to recode this when I upgrade? Seems like a step backwards for the edge case where it doesn't work one day out of 1461. But, I'll deal with it when I upgrade someday.
On Fri, Sep 20, 2019 at 9:09 AM Thomas Keffer <[email protected]> wrote: > Well, I made an "executive decision" and decided to deprecate month_delta > and year_delta. One can always add and subtract 30 days, or 365 days. > > On Fri, Sep 20, 2019 at 7:02 AM Greg Troxel <[email protected]> wrote: > >> Andrew Milner <[email protected]> writes: >> >> > mmmm >> > think I agree except for preferring to going to last day of m rather >> than >> > first day of m+1 because otherwise you can end up in the situation >> where >> > month - 1 leaves you in the same month which does not seem right. >> >> That's a good point about preferring a different calendar month. Your >> strategy also leads to reasonable day-deltas, 3/31 leads to 2/28 which >> is.... 31 days ago. So I think we'd end up with 28-31 days between any >> pair "today" and "a month ago from today ", which is a good property. >> >> You have convinced me to change to move earlier to valid day. That's >> pretty simple, too, just set to last day of month if calculated is > last. >> >> > otherwise I think your logic is spot-on, and I was confusing myself by >> > considering the lengths of the months inbetween rather than just >> > considering the final landing month. >> >> I was trying to think "If I ask some random person on the street: what >> date is today? what date was 4 months ago?" what answer would I get and >> then trying to mechanize that. >> >> -- >> 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 on the web visit >> https://groups.google.com/d/msgid/weewx-user/rmisgor83s9.fsf%40s1.lexort.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 on the web visit > https://groups.google.com/d/msgid/weewx-user/CAPq0zEDrEAtiz_i3%3DWi-Nrn%2BYHpprHT89R0zmv4SUHbiOQmQ_g%40mail.gmail.com > <https://groups.google.com/d/msgid/weewx-user/CAPq0zEDrEAtiz_i3%3DWi-Nrn%2BYHpprHT89R0zmv4SUHbiOQmQ_g%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Peter Quinn (415)794-2264 -- 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 on the web visit https://groups.google.com/d/msgid/weewx-user/CAA1SM21MixgytdiQmHR-c6q4af9z_29t793RvvJGXc8dFZ8rJw%40mail.gmail.com.
