python-discord / sir-lancebot

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
MIT License
240 stars 240 forks source link

Seasonal information #73

Open sco1 opened 5 years ago

sco1 commented 5 years ago

This should add a year-round feature for the bot that responds with the current season (by hemisphere), and time to the next season.

Start Date End Date Northern Hemisphere Season Southern Hemisphere Season
20 March 20 June Spring Fall
21 June 21 September Summer Winter
22 September 20 December Fall Spring
21 December 19 March Winter Summer

The bot could provide equinox & solstice information as well:

Equinox Solstice Equinox Solstice
20 March 21 June 23 September 21 December

Along with a helpful embed describing what equinox and solstice are.

https://en.wikipedia.org/wiki/Equinox https://en.wikipedia.org/wiki/Solstice

scragly commented 5 years ago

Just a small note: Not all countries use the Astronomical Seasons as you've provided here, which rely on the start and end of seasons based on the Solstice and Equinox.

For example, there's the Meteorological Seasons, where seasons fall on neat month groupings that is based on the average temperatures throughout the year. For example the Australian observed seasons are:

Season Northern Months Southern Months
Spring March, April, May September, October, November
Summer June, July, August December, January, February
Autumn September, October, November March, April, May
Winter December, January, February June, July, August

As brought up by @RohanJnr, Meteorological seasons rely on the local weather/temperature patterns throughout the year, each country may vary accordingly, and this may be something we cannot account for entirely. A good example to compare the above sample against is the seasons observed by India.

Chinese cultures also have another system, often called the Solar Seasons, which is like a mix of the two. It has an everyday-usage of neat month groupings, but based on the solstice and equinox dates to signify the three darkest months for winter, and three most sun-filled for summer.

Season Northern Months Southern Months
Spring March, April, May September, October, November
Summer June, July, August December, January, February
Autumn September, October, November March, April, May
Winter December, January, February June, July, August

However, this system is the generalised everyday usage version of the Chinese seasons. They also have more detailed 24-term solar seasonal calendar. The terms consist of 12 pairs major and minor terms.

As you can see, the Start of Summer term is signified on the top right, and Start of Autumn is signified on the bottom right, splitting the year cleanly into a quarter, with the Summer Solstice marking a clear middlepoint. This is where the general usage comes from.

In the case that such a feature does get developed into the Evergreen cog, I hope that we provide all three of these systems in the output, not just Astronomical seasons, as we would want to avoid disregarding any portion of our members.

brad90four commented 3 years ago

So I see that this was approved in Feb of last year, but was there an agreed implementation method?

There would be a command named "season" with options for astronomical, meteorological, and solar seasons. If no options are passed, what should the default response be? Should there also be a North / South hemisphere check or just default to sending both?

Just trying to wrap my head around what could be done and what the result will be.

User Input

.season <optional season: astro, meteor, solar : default astro?> <optional hemispehere: north, south: default north?>

Bot Response

Based on user input of .season astro north The current astronomical season in the Northern Hemisphere is Summer. The next season Fall will start in 19 days on 22 September. The autumnal equinox is on 22 September. The December solstice is on 21 December. More information for equinoxes and solstices can be found here: Equinox - Solstice

mathstrains21 commented 2 years ago

Hi! I would like to work on this! For the solar/chinese system, I guess that it is just the opposite for the southern hemisphere like with the other seasons?

parth-verma7 commented 1 year ago

@brad90four Hi! I would like to work upon this issue. Please assign it to me. Thank You!

brad90four commented 1 year ago

Tagging @Xithrius , any issues with assigning this to @parth-verma7 ?

Xithrius commented 1 year ago

I have no objections.

wookie184 commented 1 year ago

@parth-verma7 What is the plan for implementation here given the previous discussion? As seasons work differently in different places, what type will be used? Will an API need to be used to get the necessary information?

parth-verma7 commented 1 year ago

@wookie184 I could not find any api for seasons . My way: i) Extract country. ii) Extract the current time zone. iii) Return the time zone from some database in which all the seasons vs country are stored. I have attached a sample image, please have a look. image