public void TestPointFormatWithOffset(int year, int month, int day, long offset, TimeFormat format, string expectedOutput) { var calendar = StandardCalendar.Create(year, month, day, 1); Assert.AreEqual(expectedOutput, calendar.FormatTime(new TimePoint(offset), format)); }
public void StartGame() { if (IsGameStarted) { return; } AppModel.GameData = new GameData(StandardCalendar.Create(2050, 1, 1, Constants.TicksPerDay)); m_gameServices.Processor.RegisterGameData(AppModel.GameData); m_gameServices.Processor.ProcessingStopped += OnProcessingStopped; InitializeEntities(); UpdateCurrentDate(); UpdateShipOrders(); IsGameStarted = true; }
public static int GetWeekOfYear(this DateTime t) { return(StandardCalendar.GetWeekOfYear(t, StandardWeekRule, StandardFirstDayOfWeek)); }
public void TestOffsetFormat(long offset, TimeFormat format, string expectedOutput) { var calendar = StandardCalendar.Create(2000, 1, 1, 1); Assert.AreEqual(expectedOutput, calendar.FormatOffset(new TimeOffset(offset), format)); }