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); }
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); }
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); }
public bool IsValidLostCousins(FactDate when) { return(FactDate.IsKnown && (FactType == Fact.LOSTCOUSINS || FactType == Fact.LC_FTA) && FactDate.YearMatches(when) && FactDate.IsNotBEForeOrAFTer && FactErrorLevel == Fact.FactError.GOOD); }
public bool IsValidCensus(FactDate when) { return(FactDate.IsKnown && IsCensusFact && FactDate.YearMatches(when) && FactDate.IsNotBEForeOrAFTer && FactErrorLevel == Fact.FactError.GOOD); }