Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ad-si/tu
CLI tool to convert a natural language date/time string to UTC
https://github.com/ad-si/tu
cli cli-tool date datetime iso8601 rfc3339 rust time utc
Last synced: 4 days ago
JSON representation
CLI tool to convert a natural language date/time string to UTC
- Host: GitHub
- URL: https://github.com/ad-si/tu
- Owner: ad-si
- Created: 2024-03-16T14:23:42.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T10:17:50.000Z (10 months ago)
- Last Synced: 2025-01-19T12:06:32.809Z (11 days ago)
- Topics: cli, cli-tool, date, datetime, iso8601, rfc3339, rust, time, utc
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 237
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# `tu`
CLI tool to convert a natural language date/time **t**o **U**TC.
## Installation
```sh
cargo install tu
```## Usage
```txt
Usage: tuExamples:
tu today -> 2024-03-16T12:56:41.905455Z
tu tomorrow -> 2024-03-17T12:56:41.905455Z
tu 2 day -> 2024-03-18T12:56:41.905455Z
tu 9 week -> 2024-05-18T12:56:41.905455Z
tu 1 month -> 2024-04-16T00:00:00Ztu 2024-04-10T13:31:46+04:00 -> 2024-04-10T09:31:46Z
tu Wed, 14 Feb 2024 23:16:09 GMT -> 2024-02-14T23:16:09Z
```This is especially useful in combination with other tools like [TaskLite]:
```bash
# Bash
tasklite add "Buy bike" due:$(tu 2 week)
``````fish
# Fish
tasklite add "Buy bike" due:(tu 2 week)
```[TaskLite]: https://tasklite.org
## Related
- [`when`] - Timezone CLI tool.
- [utcify.ad-si.com] - Web tool to convert local-time strings to UTC.
- [`fuzzy-time`] - Haskell package for parsing fuzzy time strings.[`when`]: https://github.com/mitsuhiko/when
[utcify.ad-si.com]: https://utcify.ad-si.com
[`fuzzy-time`]: https://github.com/NorfairKing/fuzzy-time