-
Notifications
You must be signed in to change notification settings - Fork 3
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
Comments
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." |
As a duration, we'd represent 30 minutes after sunset as So if hunting is allowed from 9:00 AM until 30 minutes after sunset, we'd represent that as 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. |
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). |
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. |
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.
The text was updated successfully, but these errors were encountered: