Open Arlodotexe opened 2 years ago
After a bit of research, I found a trick that may do the job, without needing to map countries to latitude (countries can change).
From what I've read, the Persian calendar starts with the vernal equinox, but always relative to Iran in the north hemisphere. That should mean the date is the same for seasons in both north and south hemisphere, but this needs to be tested.
We need someone in the southern hemisphere to spin up a console app and see what this outputs:
using System;
public class Program
{
public static void Main()
{
var persianMonth = new System.Globalization.PersianCalendar().GetMonth(DateTime.Now);
var season = (Season)Math.Ceiling(persianMonth / 3.0);
Console.WriteLine(season);
}
enum Season
{
Spring = 1,
Summer = 2,
Autumn = 3,
Winter = 4
};
}
Background
Right now, when the app is starting up, we display "Quips". These are witty remarks that change depending on language, time of day or year, region, etc., and are meant to entertain the user briefly while the app loads.
Problem
Seasonable quips are based on the current date, but these are based on the dates seasons stop and start for the northern hemisphere. In the sourthern hemisphere, the dates that seasons start and stop are different, meaning anyone using the app in the southern hemisphere will see quips for the wrong season.
Solution