WikiCrawler/Utility/DateUtility.cs
/// <summary>
/// If the specified date is entirely contained within a decade, returns it.
/// </summary>
/// <returns>True if the date fit within one decade.</returns>
If the specified date is entirely contained within a decade, returns it.
If the specified date is entirely contained within a decade returns it .
public static bool GetDecade(DateParseMetadata parse, out int decade)
	{
		int earlyDecade = parse.EarliestYear / 10;
		int lateDecade = parse.LatestYear / 10;
		if (earlyDecade == lateDecade)
		{
			decade = earlyDecade * 10;
			return true;
		}
		else
		{
			decade = 0;
			return false;
		}
	}
public static bool GetDecade ( DateParseMetadata parse , out int decade ) { int earlyDecade = parse . EarliestYear / 10 ; int lateDecade = parse . LatestYear / 10 ; if ( earlyDecade == lateDecade ) { decade = earlyDecade * 10 ; return true ; } else { decade = 0 ; return false ; } }
If the specified date is entirely contained within a decade, returns it.
If the specified date is entirely contained within a decade returns it .
True if the date fit within one decade.
True if the date fit within one decade .
parse
DateParseMetadata
int
out