System.TimeZoneInfo.IsInDSTForYear C# (CSharp) Method

IsInDSTForYear() private method

private IsInDSTForYear ( AdjustmentRule rule, System.DateTime dateTime, int year ) : bool
rule AdjustmentRule
dateTime System.DateTime
year int
return bool
		bool IsInDSTForYear (AdjustmentRule rule, DateTime dateTime, int year)
		{
			DateTime DST_start = TransitionPoint (rule.DaylightTransitionStart, year);
			DateTime DST_end = TransitionPoint (rule.DaylightTransitionEnd, year + ((rule.DaylightTransitionStart.Month < rule.DaylightTransitionEnd.Month) ? 0 : 1));
			if (dateTime.Kind == DateTimeKind.Utc) {
				DST_start -= BaseUtcOffset;
				DST_end -= (BaseUtcOffset + rule.DaylightDelta);
			}

			return (dateTime >= DST_start && dateTime < DST_end);
		}