Esempio n. 1
0
        /// <inheritdoc/>
        public override bool IsThisFestival(DateTime date)
        {
            var cdate    = ChineseDate.From(date);
            var festival = ChineseDate.From(cdate.Year, Month, Day);

            return(cdate == festival);
        }
Esempio n. 2
0
 /// <inheritdoc/>
 protected override bool TryGetDate(int year, int month, int day, out DateTime date)
 {
     try
     {
         date = ChineseDate.From(year, month, day).ToDate();
         return(true);
     }
     catch (Exception)
     {
         date = DateTime.Now;
         return(false);
     }
 }