Commit 68cf9e1
authored
feat: datetime expansion (#917)
### Description
Adds support for abbreviated datetime formats (year, year-month, date)
via a new `Search::normalize_datetimes()` method. This allows users to
opt-in to expanding partial dates to full RFC 3339 datetime ranges -
follows similar functionality to `pystac`.
**Key changes:**
- Implemented `expand_datetime_to_start()` and
`expand_datetime_to_end()` helper functions to convert abbreviated dates
to full datetime ranges
- Added `Search::normalize_datetimes()` method for opt-in datetime
normalization
- Added two new error variants: `InvalidYear` and
`UnrecognizedDateFormat` for better error handling
- Comprehensive documentation and test coverage
**Sidecar changes:**
Bumped assert_cmd from 2.0 to 2.1 in workspace dependencies. The locked
version (2.0.14) was missing the `cargo_bin_cmd!()` macro (see
[docs](https://docs.rs/assert_cmd/2.0.17/assert_cmd/cargo/)), causing
compilation failures in test code that relied on it
### Related issues
- Closes [#463](#463)
### Checklist
- [x] Unit tests
- [x] Documentation, including doctests
- [x] Pull request title follows [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/)
- [x] Pre-commit hooks pass (`prek run --all-files`)1 parent ae73aeb commit 68cf9e1
File tree
4 files changed
+390
-1
lines changed- crates
- cli/src
- core/src
- api
4 files changed
+390
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| |||
0 commit comments