Skip to content

feat: nice_xx #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 56 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ovos-date-parser

`ovos-date-parser` is a comprehensive library for multilingual date and time parsing, extraction, and formatting,
designed to handle a range of human-readable date, time, and duration expressions.
designed to handle a range of human-readable date, time, and duration expressions.

## Features

Expand Down Expand Up @@ -74,29 +74,61 @@ print(relative_time) # "tomorrow"
### Languages Supported

`ovos-date-parser` supports a wide array of languages, each with its own set of methods for handling natural language
time expressions. Available methods include `extract_datetime`, `extract_duration`, `nice_time`, and `nice_duration` for
the following languages:

| Language | `nice_time` | `nice_relative_time` | `nice_duration` | `extract_duration` | `extract_datetime` |
|----------|-------------|----------------------|-----------------|--------------------|--------------------|
| az | ✅ | ❌ | ✅ | ✅ | ✅ |
| ca | ✅ | ❌ | ❌ | ❌ | ✅ |
| cs | ✅ | ❌ | ❌ | ✅ | ✅ |
| da | ✅ | ❌ | ❌ | ❌ | ✅ |
| de | ✅ | ❌ | ❌ | ✅ | ✅ |
| en | ✅ | ❌ | ❌ | ✅ | ✅ |
| es | ✅ | ❌ | ❌ | ✅ | ✅ |
| eu | ✅ | ✅ | ❌ | ❌ | ✅ |
| fa | ✅ | ❌ | ❌ | ✅ | ✅ |
| fr | ✅ | ❌ | ❌ | ❌ | ✅ |
| hu | ✅ | ❌ | ❌ | ❌ | ❌ |
| it | ✅ | ❌ | ❌ | ❌ | ✅ |
| nl | ✅ | ❌ | ❌ | ✅ | ✅ |
| pl | ✅ | ❌ | ✅ | ✅ | ✅ |
| pt | ✅ | ❌ | ❌ | ✅ | ✅ |
| ru | ✅ | ❌ | ✅ | ✅ | ✅ |
| sv | ✅ | ❌ | ❌ | ✅ | ✅ |
| uk | ✅ | ❌ | ✅ | ✅ | ✅ |
time expressions.

Parse

| Language | `extract_duration` | `extract_datetime` |
|----------|--------------------|--------------------|
| az | ✅ | ✅ |
| ca | ❌ | ✅ |
| cs | ✅ | ✅ |
| da | ❌ | ✅ |
| de | ✅ | ✅ |
| en | ✅ | ✅ |
| es | ✅ | ✅ |
| eu | ❌ | ✅ |
| fa | ✅ | ✅ |
| fr | ❌ | ✅ |
| hu | ❌ | ❌ |
| it | ❌ | ✅ |
| nl | ✅ | ✅ |
| pl | ✅ | ✅ |
| pt | ✅ | ✅ |
| ru | ✅ | ✅ |
| sv | ✅ | ✅ |
| uk | ✅ | ✅ |

Format

| Language | `nice_date`<br>`nice_date_time`<br>`nice_day` <br>`nice_weekday` <br>`nice_month` <br>`nice_year` <br>`get_date_strings` | `nice_time` | `nice_relative_time` | `nice_duration` |
|----------|--------------------------------------------------------------------------------------------------------------------------|-------------|----------------------|-----------------|
| az | ✅ | ✅ | ❌ | ✅ |
| ca | ✅ | ✅ | ❌ | ❌ |
| cs | ✅ | ✅ | ❌ | ❌ |
| da | ✅ | ✅ | ❌ | ❌ |
| de | ✅ | ✅ | ❌ | ❌ |
| en | ✅ | ✅ | ❌ | ❌ |
| es | ❌ | ✅ | ❌ | ❌ |
| eu | ✅ | ✅ | ✅ | ❌ |
| fa | ✅ | ✅ | ❌ | ❌ |
| fr | ✅ | ✅ | ❌ | ❌ |
| hu | ✅ | ✅ | ❌ | ❌ |
| it | ✅ | ✅ | ❌ | ❌ |
| nl | ✅ | ✅ | ❌ | ❌ |
| pl | ✅ | ✅ | ❌ | ✅ |
| pt | ❌ | ✅ | ❌ | ❌ |
| ru | ✅ | ✅ | ❌ | ✅ |
| sv | ✅ | ✅ | ❌ | ❌ |
| sl | ✅ | ❌ | ❌ | ❌ |
| uk | ✅ | ✅ | ❌ | ✅ |

## Related Projects

- [ovos-number-parser](https://github.com/OpenVoiceOS/ovos-number-parser) - for handling numbers
- [ovos-lang-parser](https://github.com/OVOSHatchery/ovos-lang-parser) - for handling languages
- [ovos-color-parser](https://github.com/OVOSHatchery/ovos-color-parser) - for handling colors


## License

Expand Down
Loading