On Fri, Oct 11, 2019 at 9:41 AM Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:
>
> On Thu, 10 Oct 2019 08:47:07 -0700, pyotr filipivich <ph...@mindspring.com>
> declaimed the following:
>
>
> >"A simple program" to divide the amount of "today's" daylight into 12
> >even '"hours", so that Dawn begins the First hour, the third hour is
> >mid-morning, noon is the middle of the day, the ninth hour mid after
> >noon, and the twelfth hour ends at sunset.  Is simple, no?  {no.}
> >
>         Even ignoring "phone" this is anything but simple. It relies upon
> knowing one's latitude and date to allow computing the angle of the sun.
> And you'll need to handle the fact that above/below arctic/antarctic
> circles you will run into "zeros" where there is either 24 hours of
> daylight or 24 hours of night.
>

Or.... maybe it's really simple, because there's an HTTP API that
gives you the information. There's an API for everything these days. A
quick web search showed up this:

https://sunrise-sunset.org/api

Which means the project is a matter of taking the data and formatting
it. (Also probably getting lat/long from the phone's location API.)
I'd say this is a good-fun project - a one-week project for a student,
a weekend project for an expert. And yes, there WILL be edge cases to
deal with, but for the most part, it shouldn't be too hard.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to