Beispiel #1
0
        public void WithOffset()
        {
            var date     = new LocalDate(2012, 6, 19);
            var initial  = new OffsetDate(date, Offset.FromHours(2));
            var actual   = initial.WithOffset(Offset.FromHours(5));
            var expected = new OffsetDate(date, Offset.FromHours(5));

            Assert.AreEqual(expected, actual);
        }
Beispiel #2
0
        public void WithOffset()
        {
            var original = new OffsetDate(
                new LocalDate(2019, 5, 3),
                Offset.FromHours(3));

            OffsetDate updated = Snippet.For(original.WithOffset(Offset.FromHours(-3)));

            Assert.AreEqual(Offset.FromHours(-3), updated.Offset);
            Assert.AreEqual(original.Date, updated.Date);
        }
 public OffsetDate WithOffset() => SampleEarlier.WithOffset(LargePositiveOffset);