Exemple #1
0
 public DateTime ReturnGregorianDate(string am_date)
 {
     _date = am_date.Split('-');
     var ethDate = new EthiopianDate(int.Parse(_date[2]), EthiopianDate.GetMonthNo(_date[1]), int.Parse(_date[0]));
     ConvertedDate = ethDate.ToGregorianDate();
     return ConvertedDate;
 }
Exemple #2
0
        public DateTime ReturnGregorianDate(string am_date)
        {
            _date = am_date.Split('-');
            var ethDate = new EthiopianDate(int.Parse(_date[2]), EthiopianDate.GetMonthNo(_date[1]), int.Parse(_date[0]));

            ConvertedDate = ethDate.ToGregorianDate();
            return(ConvertedDate);
        }
Exemple #3
0
 public static string ToCTSPreferedDateFormat(this DateTime date, string lang)
 {
     if (lang.ToLower() == "gc")
     {
         IFormatProvider provider = new CultureInfo("en-GB");
         return date.ToString("dd-MMM-yyyy", provider);
     }
     else
     {
         EthiopianDate ethiopianDate = new EthiopianDate(date);
         return ethiopianDate.ToLongDateString();
     }
 }
Exemple #4
0
 public static string ToCTSPreferedDateFormat(this DateTime date, string lang)
 {
     if (date.Date.Equals(DateTime.Parse("1/1/0001")))
     {
         return(string.Empty);
     }
     if (lang.ToLower() == "gc")
     {
         IFormatProvider provider = new CultureInfo("en-GB");
         return(date.ToString("dd-MMM-yyyy", provider));
     }
     else
     {
         EthiopianDate ethiopianDate = new EthiopianDate(date);
         return(ethiopianDate.ToLongDateString());
     }
 }