Skip to content

Commit

Permalink
Removed an incorrect date/time example from the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisdoomen committed Jan 24, 2025
1 parent 4760f3c commit ae3290c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions docs/_pages/datetimespans.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ var theDatetimeOffset = 1.March(2010).At(22, 15).WithOffset(2.Hours());
// Asserts the point in time.
theDatetimeOffset.Should().Be(1.March(2010).At(21, 15).WithOffset(1.Hours()));
theDatetimeOffset.Should().NotBe(1.March(2010).At(21, 15).WithOffset(1.Hours()));

//Asserts the calendar date/time and the offset
theDatetimeOffset.Should().BeExactly(1.March(2010).At(21, 15).WithOffset(1.Hours()));
theDatetimeOffset.Should().NotBeExactly(1.March(2010).At(21, 15).WithOffset(1.Hours()));
```

Notice how we use extension methods like `March`, `At` to represent dates in a more human readable form. There's a lot more like these, including `2000.Microseconds()`, `3.Nanoseconds` as well as methods like `AsLocal` and `AsUtc` to convert between representations. You can even do relative calculations like `2.Hours().Before(DateTime.Now)`.
Expand Down

0 comments on commit ae3290c

Please sign in to comment.