private static void Weekly(TextSeries s) { s.Read(DateTime.Parse("2/6/2004"), DateTime.Parse("12/31/2004")); double mf = Point.MissingValueFlag; Point.MissingValueFlag = -9999; s.RemoveMissing(); Point.MissingValueFlag = mf; s.TimeInterval = TimeInterval.Daily; var weekly = Math.WeeklyAverageSimple(s); Assert.AreEqual(TimeInterval.Weekly, weekly.TimeInterval); Assert.AreEqual(DateTime.Parse("2/12/2004"), weekly[0].DateTime.Date); Assert.AreEqual(2.172, weekly[0].Value, 0.01); }