public void YMDHNSConstructorWorks() { var dt = new JsDate(2011, 7, 12, 13, 42, 56); Assert.AreEqual(dt.GetFullYear(), 2011); Assert.AreEqual(dt.GetMonth(), 7); Assert.AreEqual(dt.GetDate(), 12); Assert.AreEqual(dt.GetHours(), 13); Assert.AreEqual(dt.GetMinutes(), 42); Assert.AreEqual(dt.GetSeconds(), 56); }
public void GetSecondsWorks() { var dt = new JsDate(2011, 7, 12, 13, 42, 56, 345); Assert.AreEqual(dt.GetSeconds(), 56); }
public void SetSecondsWorks() { var dt = new JsDate(2000, 0, 1); dt.SetSeconds(23); Assert.AreEqual(dt.GetSeconds(), 23); }
public void ToLocalWorks() { var utc = new JsDate(2011, 7, 12, 13, 42, 56, 345); var dt = utc.ToLocalTime(); Assert.AreEqual(dt.GetUtcFullYear(), utc.GetFullYear()); Assert.AreEqual(dt.GetUtcMonth(), utc.GetMonth()); Assert.AreEqual(dt.GetUtcDate(), utc.GetDate()); Assert.AreEqual(dt.GetUtcHours(), utc.GetHours()); Assert.AreEqual(dt.GetUtcMinutes(), utc.GetMinutes()); Assert.AreEqual(dt.GetUtcSeconds(), utc.GetSeconds()); Assert.AreEqual(dt.GetUtcMilliseconds(), utc.GetMilliseconds()); }