public bool hasDstInYear(int year) { foreach (Transition tr in Transitions) { if (GPTimestamp.Year(tr.Timestamp) == year) { return(true); } } return(false); }
public DateTime EndDateInYear(int year) { Transition selected = null; foreach (Transition tr in Transitions) { if (GPTimestamp.Year(tr.Timestamp) == year && tr.Dst == false) { selected = tr; break; } } if (selected == null) { return(new DateTime()); } return((new GPTimestamp(selected.Timestamp)).getDateTime()); }