Skip to content

Commit

Permalink
docs: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sorairolake authored Oct 14, 2024
1 parent aa0bc95 commit 180e0b9
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,6 @@ Add this to your `Cargo.toml`:
nt-time = "0.10.1"
```

### Example

```rust
use core::time::Duration;

use nt_time::{
time::{macros::datetime, OffsetDateTime},
FileTime,
};

let ft = FileTime::NT_TIME_EPOCH;
assert_eq!(
OffsetDateTime::try_from(ft).unwrap(),
datetime!(1601-01-01 00:00 UTC)
);

let ft = ft + Duration::from_secs(11_644_473_600);
assert_eq!(
OffsetDateTime::try_from(ft).unwrap(),
OffsetDateTime::UNIX_EPOCH
);
assert_eq!(ft.to_raw(), 116_444_736_000_000_000);

assert_eq!(FileTime::new(u64::MAX), FileTime::MAX);
```

### Crate features

#### `std`
Expand Down

0 comments on commit 180e0b9

Please sign in to comment.