Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Represent times relative to sunrise and sunset #8

Open
waldoj opened this issue Apr 24, 2014 · 4 comments
Open

Represent times relative to sunrise and sunset #8

waldoj opened this issue Apr 24, 2014 · 4 comments
Labels

Comments

@waldoj
Copy link
Member

waldoj commented Apr 24, 2014

We need a machine-readable way to indicate "sunrise" or "half an hour before sunrise." Note that we cannot set a time for this, because sunrise in Wise and sunrise in Accomack—which are hundreds of miles apart—occur at very different times. A quick search reveals no ISO standard for this.

@waldoj
Copy link
Member Author

waldoj commented Apr 30, 2014

It might be reasonable to bend ISO 8601 a bit here, given that there's no apparent applicable standard. 8601 describes durations, which we might be able to apply here to with a tuple of "sunrise", "-30 minutes."

@waldoj
Copy link
Member Author

waldoj commented Jun 17, 2014

As a duration, we'd represent 30 minutes after sunset as PTsunset30M. (P is the prefix for intervals, T means "time," 30 is obvious, and M means "minutes.") It could also be represented as PTsunset.5H, with H meaning "hours."

So if hunting is allowed from 9:00 AM until 30 minutes after sunset, we'd represent that as T09:00:00/PTsunset30M.

I am not sure that this is a good idea. Basically everybody consuming this is going to have to toss out their programming language's standard date/time parsing functionality. What a terrible headache. But I don't know how else to do this—"sunset" isn't a concept that exists in time parsers. So while I don't think this is a good idea, I also don't have a better idea.

@danxoneil
Copy link

This is a completely logical approach-- definitely should implement it.

As an aside, and probably from more of an implementation/ display point of view, is there a reliable service for delivering time of sunset for a given day and a given lat/long? We already have place and time in this system, so it may be possible to express "30 minutes after sunset" as the product of 3 known things (time, place, interval after sunset) and one discoverable thing (time of sunset).

@waldoj
Copy link
Member Author

waldoj commented Jun 17, 2014

is there a reliable service for delivering time of sunset for a given day and a given lat/long

Yes, there definitely is, both via API and actually within many programming languages (e.g., PHP). And I'm glad you mention that, because I've taken as a given that this is the case, but I hadn't actually recorded here that one of my assumptions is that a) the user agent will know the location in question and b) be able to calculate when "sunset" is for that user.

@waldoj waldoj added the hunting label Sep 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants