Exemple #1
0
        public static bool IsCensusCountry(FactDate fd, FactLocation location)
        {
            List <CensusDate> matches = SUPPORTED_CENSUS.Where(cd => cd.Country.Equals(location.CensusCountry)).ToList();

            foreach (CensusDate cd in matches)
            {
                if (fd.YearMatches(cd))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemple #2
0
 public static CensusDate GetLostCousinsCensusYear(FactDate fd, bool exactYear)
 {
     foreach (CensusDate cd in LOSTCOUSINS_CENSUS)
     {
         if (exactYear && fd.YearMatches(cd))
         {
             return(cd);
         }
         if (!exactYear && fd.Overlaps(cd))
         {
             return(cd);
         }
     }
     return(null);
 }
Exemple #3
0
 public static bool IsUKCensusYear(FactDate fd, bool exactYear)
 {
     foreach (CensusDate cd in UK_CENSUS)
     {
         if (exactYear && fd.YearMatches(cd))
         {
             return(true);
         }
         if (!exactYear && fd.Overlaps(cd))
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #4
0
 public bool IsValidLostCousins(FactDate when)
 {
     return(FactDate.IsKnown && (FactType == Fact.LOSTCOUSINS || FactType == Fact.LC_FTA) &&
            FactDate.YearMatches(when) && FactDate.IsNotBEForeOrAFTer && FactErrorLevel == Fact.FactError.GOOD);
 }
Exemple #5
0
 public bool IsValidCensus(FactDate when)
 {
     return(FactDate.IsKnown && IsCensusFact && FactDate.YearMatches(when) && FactDate.IsNotBEForeOrAFTer && FactErrorLevel == Fact.FactError.GOOD);
 }