using System;
using System.Globalization;

namespace SepehrTourApiSampleClient.BuiltinTypeExtensions
{
    public static class DateTimeExtension
    {
        public static string MiladiToShamsi(this DateTime miladiDate)
        {
            var persianCalendar = new PersianCalendar();
            return
                $"{persianCalendar.GetYear(miladiDate)}-{persianCalendar.GetMonth(miladiDate)}-{persianCalendar.GetDayOfMonth(miladiDate)}";
        }
    }
}
