duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

Seasons: Wrong dates for Southern Hemisphere! #1927

Closed moollaza closed 7 years ago

moollaza commented 9 years ago

A user pointed out that our results for Australia (and the rest of the Southern Hemisphere are incorrect!)

https://twitter.com/nauzilus/status/609086192814923777

We incorrectly assumed that "summer" implies June, but the seasons depend on the hemisphere of the country. We need to be able to determine the hemisphere of the country we're working with in order to choose the correct solstice (June vs December).

/cc @mayo


IA Page: https://duck.co/ia/view/seasons

moollaza commented 9 years ago

An interim fix for this would be to make a 2nd API call to Time&Date for the given country in order to get the Lat/Lon of it. Using that, we can determine the hemisphere and choose the right date.

mayo commented 9 years ago

@moollaza I've been pondering about this, but didn't have a chance to dig in. I think the DDG location API already gives lon/lat, so it shouldn't need a second request. We already use that to get the country name if none is specified.

I'll try to get a patch tonight.

mayo commented 9 years ago

Pull request https://github.com/duckduckgo/zeroclickinfo-spice/pull/1989

moollaza commented 7 years ago

IA is no longer live