Releases: uutils/parse_datetime
v0.13.1
This is a small bug fix release: a string like "1234.123456789 seconds ago" caused an invalid date error (see uutils/coreutils#8754). In addition, the unused regex
dependency has been removed.
Thanks to @yuankunzhang and @stillbeingnick for their PRs!
What's Changed
- chore: remove regex crate as dependency by @yuankunzhang in #236
- docs: add comments for the build function by @yuankunzhang in #237
- Changing ErrMode::Cut to ErrMode::Backtrack to allow alt parser flow (Fix for uutils/coreutils issue 8754) by @stillbeingnick in #238
New Contributors
- @stillbeingnick made their first contribution in #238
Full Changelog: v0.13.0...v0.13.1
v0.13.0
This is a small release to add a single feature: support for TZ="timezone"
at the beginning of an input string.
Thanks to @yuankunzhang for implementing it.
What's Changed
- refactor: rename the timezone module to offset by @yuankunzhang in #231
- add support for
TZ="timezone"
date spec by @yuankunzhang in #232
Dependencies
Full Changelog: v0.12.0...v0.13.0
v0.12.0
Breaking change: we have migrated from chrono to jiff. Our parse functions now return a jiff::Zoned struct upon success. Additionally, parse_datetime_at_date
now requires a jiff::Zoned
struct as an argument.
A big thank you to @yuankunzhang for all their work for this release!
What's Changed
- fix: remove unsupported named time zones by @yuankunzhang in #198
- feat: implement pure number parsing by @yuankunzhang in #199
- code and docs minor improvements by @yuankunzhang in #201
- refactor: improve timestamp handling and validation in builder by @yuankunzhang in #202
- refactor: extract timezone functionality from time module to timezone module by @yuankunzhang in #203
- refactor: replace floating-point seconds with precise integer representation by @yuankunzhang in #205
- (jiff series #1) refactor: add jiff and optimize date type sizes by @yuankunzhang in #208
- (jiff series #2) refactor: optimize time type sizes and add conversion from
Time
tojiff::civil::Time
by @yuankunzhang in #209 - (jiff series #3) refactor: use
(i64, u32)
for fractional seconds in relative time parsing by @yuankunzhang in #210 - (jiff series #4) refactor: optimize offset type sizes and add conversion from
Offset
tojifff::tz::Offset
by @yuankunzhang in #211 - (jiff series #5) refactor: add conversion from
Day
tojiff::civil::Weekday
by @yuankunzhang in #212 - (jiff series #6) refactor: replace chrono with jiff by @yuankunzhang in #213
- refactor: improve api encapsulation by @yuankunzhang in #215
- fix: use
checked_mul()
to avoid overflow panic by @yuankunzhang in #217 - refactor: improve timestamp handling and test organization by @yuankunzhang in #218
- fix: use
checked_mul()
to avoid overflow with "week" by @cakebaker in #219 - refactor: rename var to fix typo by @cakebaker in #216
- refactor: rename a function name and a var name by @cakebaker in #214
- refactor: misc minor refactors by @yuankunzhang in #221
- refactor: improve timezone offset parsing and validation by @yuankunzhang in #222
- fix: support timezone offsets that exceed 24-hour range by @yuankunzhang in #223
- refactor: replace Option-based error handling with Result-based error handling by @yuankunzhang in #225
- refactor: replace imperative parsing loop with functional combinators by @yuankunzhang in #230
Dependencies
- chore(deps): bump slab from 0.4.10 to 0.4.11 by @dependabot[bot] in #206
- fix(deps): update rust crate winnow to v0.7.13 by @renovate[bot] in #220
- fix(deps): update rust crate regex to v1.11.2 by @renovate[bot] in #224
- chore: update dependencies by @yuankunzhang in #229
New Contributors
- @dependabot[bot] made their first contribution in #206
Full Changelog: v0.11.0...v0.12.0
v0.11.0
A big thank you to @yuankunzhang for all their work for this release!
What's Changed
- use proper error mode in items::parse() by @yuankunzhang in #143
- use a custom float parser by @yuankunzhang in #148
- fix: check whether the parsed time contains timezone by @yuankunzhang in #150
- fix: use custom dec_uint in ordinal parsing by @yuankunzhang in #155
- Simplify items/mod.rs by moving the fundamental combinators to their own module by @yuankunzhang in #157
- fix relative date time handling by @yuankunzhang in #152
- fix: weekday may be followed by an optional comma by @yuankunzhang in #159
- Integration tests for date parsing by @Maximkaaa in #161
- tests: add license header to integration tests by @cakebaker in #164
- tests: fix typos by @cakebaker in #163
- test: Integration tests for time parsing by @Maximkaaa in #167
- clippy: fix warning from
uninlined_format_args
by @cakebaker in #170 - fix: check overflows during date time composition by @yuankunzhang in #171
- feat: support nanoseconds by @yuankunzhang in #168
- fix: hour must be greater than 0 when meridiem is specified by @yuankunzhang in #169
- refactor: put the epoch and timezone module into separate files by @yuankunzhang in #172
- refactor: introduce a builder and simplify the date time composition by @yuankunzhang in #173
- fix: timestamp cannot be combined with other items by @yuankunzhang in #174
- chore: re-organize items/mod.rs by @yuankunzhang in #178
- fix: time offset can only appear after time or timezone by @yuankunzhang in #180
- feat: support leading zeros in
timezone_colonless()
by @yuankunzhang in #181 - feat: add a
ctx_err
util function by @yuankunzhang in #182 - Improve the
ios1()
andiso2()
date parsers by @yuankunzhang in #183 - Improve the
us()
date parser by @yuankunzhang in #184 - feat: improve the literal date parsers by @yuankunzhang in #186
- feat: add a year module by @yuankunzhang in #187
- Update comments by @yuankunzhang in #188
- fix: support float timestamp values by @yuankunzhang in #189
- fix base datetime handling in the builder by @yuankunzhang in #190
- docs: update comments by @yuankunzhang in #191
- Update readme by @yuankunzhang in #192
- tests: set timezone to
UTC0
in integration tests by @cakebaker in #162 - chore: remove unnecessary
Option
as return value by @cakebaker in #179
Dependencies
- fix(deps): update rust crate libfuzzer-sys to v0.4.10 by @renovate[bot] in #175
- fix(deps): update rust crate winnow to v0.7.12 by @renovate[bot] in #176
- chore(deps): update rust crate rstest to v0.26.1 by @renovate[bot] in #194
New Contributors
- @Maximkaaa made their first contribution in #161
Full Changelog: v0.10.0...v0.11.0
v0.10.0
What's Changed
- Allow uppercase for words like "today", "next", etc. by @dan-hipschman in #134
- Replace the regex parser with winnow-based parse by @yuankunzhang in #137
- Code cleanup by @yuankunzhang in #138
- Specify MSRV 1.71.1 by @yanganto in #142
- Upgrade winnow to 0.7.10 by @yuankunzhang in #141
- Fix/improve tests by @drinkcat in #146
- fallible offset conversion by @yuankunzhang in #145
Dependencies
New Contributors
- @yuankunzhang made their first contribution in #137
- @yanganto made their first contribution in #142
- @drinkcat made their first contribution in #146
Full Changelog: v0.9.0...v0.10.0
v0.9.0
What's Changed
- README.md: fix incorrect sentence by @cakebaker in #120
- Allow spaces between +/- and number by @dan-hipschman in #129
- Rename
TWELVEHOUR
toTWELVE_HOUR
by @cakebaker in #121 - clippy: fix some warnings from clippy::pedantic by @cakebaker in #130
- Parse relative weekdays like "next monday" by @dan-hipschman in #128
Dependencies
New Contributors
- @dan-hipschman made their first contribution in #129
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
- Parse datetimes with single digit timezone offset by @jfinkels in #102
- Parse datetime with T separator and single digit offset by @jfinkels in #103
- Make tests of adding months more resilient by @jfinkels in #112
- Explicitly set timezone UTC0 in a unit test by @jfinkels in #113
- Allow empty string in parse_relative_time_at_date by @jfinkels in #114
- Greedy parsing of datetime before time delta by @jfinkels in #115
- Add a lot more unit tests by @jfinkels in #118
- Remove more useless calls to add zero months to date by @jfinkels in #116
- Add time to parsed date after parsing not before by @jfinkels in #117
- Parse reference datetime and timedelta from the same string by @jfinkels in #110
- Prepare the new relase + clippy by @sylvestre in #119
Dependencies
- Bump
nom
& adapt to API changes by @cakebaker in #107 - fix(deps): update rust crate libfuzzer-sys to v0.4.9 by @renovate in #109
- fuzz: remove
rand
dependency by @cakebaker in #111
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
- Don't use Durations for calculating relative times by @ysthakur in #85
parse_relative_time
: Include 'this' direction by @jetlime in #87- clippy: fix warning from
needless_return
lint by @cakebaker in #95 - ci: use
-Cinstrument-coverage
instead of-Zprofile
by @cakebaker in #92 - Add support for military time zones by @jfinkels in #97
- Parse single digit timezone offsets by @jfinkels in #101
- readme: bump version to 0.6.0 by @cakebaker in #78
- Parse calendar dates with slashes, like 2/29/1996 by @jfinkels in #99
- Overflow surplus days when adding months to a date by @jfinkels in #100
Dependencies
- fix(deps): update rust crate regex to v1.10.5 by @renovate in #79
- fix(deps): update rust crate regex to v1.10.6 by @renovate in #81
- Bump
chrono
andiana-time-zone
; fix use of deprecated function by @cakebaker in #74 - fix(deps): update rust crate chrono to v0.4.38 by @renovate in #75
- fix(deps): update rust crate regex to v1.11.0 by @renovate in #89
- fix(deps): update rust crate regex to v1.11.1 by @renovate in #90
- fix(deps): update rust crate libfuzzer-sys to v0.4.8 by @renovate in #91
- chore(deps): update codecov/codecov-action action to v5 by @renovate in #93
- chore(config): migrate renovate config by @renovate in #94
- fix(deps): update rust crate chrono to v0.4.39 by @renovate in #96
- Bump
iana-time-zone
infuzz
from0.1.56
to0.1.61
by @cakebaker in #88
New Contributors
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
- Fixes Negative numbers for @ not being recognized by @philolo1 in #43
- Support weekdays in parse_datetime by @philolo1 in #34
- fix readme by @drmorr0 in #63
- support for parsing date string with only time by @matrixhead in #65
- clippy: fix warnings by @cakebaker in #69
- epoch timezone fix by @matrixhead in #67
- Fix single digit date parsing by @RenjiSann in #76
Dependencies
- Update Rust crate regex to 1.9.6 by @renovate in #51
- Update Rust crate regex to v1.10.0 by @renovate in #52
- Update Rust crate regex to 1.10.1 by @renovate in #53
- Update Rust crate regex to 1.10.2 by @renovate in #54
- Update Rust crate regex to 1.10.3 by @renovate in #58
- fix(deps): update rust crate libfuzzer-sys to 0.4.7 by @renovate in #71
- fix(deps): update rust crate regex to 1.10.4 by @renovate in #72
CI
- Revert "Update codecov/codecov-action action to v4" by @cakebaker in #49
- ci: use dtolnay/rust-toolchain instead of action_rs/toolchain by @cakebaker in #59
- ci: remove actions-rs/cargo & use cargo directly by @cakebaker in #60
- chore(deps): update codecov/codecov-action action to v4 by @renovate in #62
- ci: use codecov token by @cakebaker in #64
- ci: use
clippy --all-targets
by @cakebaker in #73
New Contributors
- @drmorr0 made their first contribution in #63
- @matrixhead made their first contribution in #65
- @RenjiSann made their first contribution in #76
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- add 'next' and 'last' support by @undali in #26
- Add test for parsing epoch seconds by @Benjscho in #31
- Add tests for unix timestamp by @philolo1 in #32
- Use timestamp_opt() instead of timestamp() in test by @cakebaker in #38
- Make parse_datetime::parse_datetime::from_str accept relative time by @philolo1 in #33
- Fix small smelling error in readme by @philolo1 in #41
- Adapt chrono settings to remove old time crate by @cakebaker in #42
- Use Rust 2021 edition for fuzzing by @cakebaker in #45
- Update actions/checkout action to v4 by @renovate in #47
- Update codecov/codecov-action action to v4 by @renovate in #48
- update version to 0.5.0 by @philolo1 in #46
dep updates
- Update Rust crate regex to v1.9.1 by @renovate in #27
- Update Rust crate regex to 1.9.3 by @renovate in #29
- Update Rust crate regex to 1.9.4 by @renovate in #35
- Update Rust crate regex to 1.9.5 by @renovate in #44
New Contributors
Full Changelog: v0.4.0...v0.5.0