Skip to content

Commit d903d06

Browse files
committed
refactor: update duration parser to align with ISO 8601 standard
- Replaced naive parsing with structured component-based approach - Enhanced both iso8601 and human-readable parsers with proper validation and unit order checks - Added more tests, achieving 97.52% test coverage
1 parent e400c6a commit d903d06

File tree

2 files changed

+453
-161
lines changed

2 files changed

+453
-161
lines changed

docs/docs/core/data_types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This is the list of all basic types supported by CocoIndex:
3535
| Time | | `datetime.time` | `datetime.time` |
3636
| LocalDatetime | Date and time without timezone | `cocoindex.LocalDateTime` | `datetime.datetime` |
3737
| OffsetDatetime | Date and time with a timezone offset | `cocoindex.OffsetDateTime` | `datetime.datetime` |
38-
| TimeDelta | A duration of time | `cocoindex.typing.TimeDelta` | `datetime.timedelta` |
38+
| TimeDelta | A duration of time | `datetime.TimeDelta` | `datetime.timedelta` |
3939
| Vector[*T*, *Dim*?] | *T* must be basic type. *Dim* is a positive integer and optional. |`cocoindex.Vector[T]` or `cocoindex.Vector[T, Dim]` | `list[T]` |
4040
| Json | | `cocoindex.Json` | Any data convertible to JSON by `json` package |
4141

0 commit comments

Comments
 (0)