using System;
using System.Globalization;

namespace SepehrHotelApiSampleClient.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)}";
        }
    }
}
