Which Season?

which-season-autumn-date-time

Did you know?:


Though we all agree that a calendar year is divided into four seasons, people sometimes disagree on the dates when these seasons start or finish. Many bodies, for example meteorologists, adopt a convention for the purpose of presenting statistics by grouping the twelve months of the year into four three-month seasons, for example March, April and May being taken as Spring.

In this case the seasons could be defined as follows:

From To Season
1st September 30th November Autumn
1st December 28/29th February Winter
1st March 31st May Spring
1st June 31th August Summer

Other scientists and astronomers prefer to define the four seasons based on astronomical events known as the equinoxes and the solstices. The equinoxes occur in March and September when the Sun is ‘edgewise’ to the Earth’s axis of rotation so that everywhere on Earth has twelve hours of daylight and twelve hours of darkness. The solstices occur in June and December when the Earth’s axis is at its extreme tilt towards and away from the Sun so at mid-day it appears at its highest in one hemisphere and at its lowest in the other.

The exact dates for the solstices and equinoxes vary from one year to the other but are around the 21st of the months mentioned above.

From To Season
21st September 20th December Autumn
21st December 20th March Winter
21st March 20th June Spring
21st June 20th September Summer

Your Challenge:


Write a computer program that retrieves today’s date. The program should then display the season for this date based on the astronomical definition of the four seasons.

We have started the code for you but have only worked out the dates for Spring. You can now complete the code to cater for all four seasons.


unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 2.5 / 5. Vote count: 15

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: , ,