Skip to content

Commit 4cfe8db

Browse files
authored
Merge pull request #192 from yuankunzhang/update-readme
Update readme
2 parents b2bb6df + 1e7a541 commit 4cfe8db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A Rust crate for parsing human-readable relative time strings and human-readable
1010

1111
- Parses a variety of human-readable and standard time formats.
1212
- Supports positive and negative durations.
13-
- Allows for chaining time units (e.g., "1 hour 2 minutes" or "2 days and 2 hours").
13+
- Allows for chaining time units (e.g., "1 hour 2 minutes" or "2 days 2 hours ago").
1414
- Calculate durations relative to a specified date.
1515
- Relies on Chrono
1616

@@ -58,7 +58,6 @@ The `parse_datetime` and `parse_datetime_at_date` functions support absolute dat
5858
- "tomorrow"
5959
- use "ago" for the past
6060
- use "next" or "last" with `unit` (e.g., "next week", "last year")
61-
- combined units with "and" or "," (e.g., "2 years and 1 month", "1 day, 2 hours" or "2 weeks 1 second")
6261
- unix timestamps (for example "@0" "@1344000")
6362

6463
`num` can be a positive or negative integer.

src/items/builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ impl DateTimeBuilder {
233233
}
234234

235235
for rel in self.relative {
236+
// TODO: Handle potential overflows in the addition operations.
236237
match rel {
237238
relative::Relative::Years(x) => {
238239
dt = dt.with_year(dt.year() + x)?;

0 commit comments

Comments
 (0)