const int TOTAL_DAYS_IN_YEAR = 365;
const int TOTAL_MONTH_IN_YEAR = 12;
const int TOTAL_DAYS_IN_MONTH = 30;
public static void Main()
calculate(new DateTime(2020, 1, 2), new DateTime(2021, 2, 2),"Test 1");
static void calculate(DateTime startDate, DateTime endDate,string _case)
Console.WriteLine("Form: {0}", startDate.ToShortDateString());
Console.WriteLine("To: {0}\n", endDate.ToShortDateString());
var result = (endDate - startDate).TotalDays;
Console.WriteLine("TotalDaysExperience: {0}\n", result);
var years = Math.Round(result / TOTAL_DAYS_IN_YEAR, 2);
Console.WriteLine("TotalYearsExperience: {0}\n", years);
var months = years % 1 * TOTAL_MONTH_IN_YEAR;
Console.WriteLine("MonthsExperience: {0}\n", Math.Round(months));
var days = months % 1 * TOTAL_DAYS_IN_MONTH;
Console.WriteLine("DaysEexperience: {0}\n", Math.Round(days));
Console.WriteLine("Your Eexperience is {0} Years {1} Months and {2} Days\n", Math.Round(years),Math.Round(months),Math.Round(days));
Console.WriteLine("-------------------End of {0}----------------",_case);