Example #1
0
 protected virtual bool IsDateValid(PersianDateTime dt)
 {
     if (dt == null)
     {
         return(false);
     }
     if (MaxDateTime != null && dt.ToGorgian() > MaxDateTime.ToGorgian().Date)
     {
         return(false);
     }
     if (MinDateTime != null && dt.ToGorgian() < MinDateTime.ToGorgian().Date)
     {
         return(false);
     }
     return(true);
 }
 public static bool IsValid(PersianDateTime start, PersianDateTime end)
 {
     return(start.ToGorgian() <= end.ToGorgian());
 }