Ejemplo n.º 1
0
        public void FormatToday_Iso_Utc()
        {
            DateTime date  = new DateTime(1970, 1, 1).ToUniversalTime();
            var      clock = new StubClock(Instant.FromDateTimeUtc(date));
            Diary    diary = new Diary(clock, CalendarSystem.Iso, DateTimeZone.Utc);

            string today = diary.FormatToday();

            Assert.AreEqual("1970-01-01", today);
        }
Ejemplo n.º 2
0
        public void FormatToday_Iso_NegativeOffset()
        {
            DateTimeZone zone  = DateTimeZone.ForOffset(Offset.FromHours(-8));
            var          clock = new StubClock(Instant.FromUtc(1970, 01, 01, 00, 00));
            Diary        diary = new Diary(clock, CalendarSystem.Iso, zone);

            string today = diary.FormatToday();

            Assert.AreEqual("1969-12-31", today);
        }
Ejemplo n.º 3
0
 public void Start()
 {
     Console.WriteLine("Today is: {0}", diary.FormatToday());
     Console.WriteLine("License valid? {0}", license.HasExpired);
 }