Пример #1
0
        public static bool TryParseGregorianToShamshiDate(DateTime date, out PersianDate resultStrDate, out Exception exception)
        {
            exception = null;

            resultStrDate = DateTime.Now;

            try
            {
                resultStrDate = PersianDate.Parse(date);

                return(true);
            }

            catch (Exception ex)
            {
                exception = ex;
            }

            return(false);
        }
Пример #2
0
 public static string CurrentShamsiDate()
 {
     return(PersianDate.Parse(DateTime.Today).ToString().Substring(0, 10));
 }