if you go with the query approach, you'll probably want to use the definition of "day is 0600-1800" and "night is 1800-0600". i'm sure there are some sql gurus out there who could come up with a query that would do this?
if you go with the incremental approach, you could use sunrise/sunset or something more sophisticated than 0600/1800 as the cutoffs. probably not a big deal for those closer to the equator, but more noticeable for those toward the poles. as for implementation of the incremental approach, one way to do it would be to write a service that runs twice each day - sunrise and sunset (or 0600 and 1800) and saves the previous day/night min/max to a separate database. then write a search list extension that provides templates with access to that database. you could write a separate, standalone tool to backfill - it would crawl through your existing data and bring the separate database up to date. m -- 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]. For more options, visit https://groups.google.com/d/optout.
