#date-time #nlp #date #time #utc #command-line-tool

bin+lib tu

CLI tool to convert a natural language date/time string to UTC

2 unstable releases

0.2.0 Apr 10, 2024
0.1.0 Mar 16, 2024

#570 in Text processing

Download history 2/week @ 2024-07-30 2/week @ 2024-09-17 11/week @ 2024-09-24

83 downloads per month

ISC license

32KB
907 lines

tu

CLI tool to convert a natural language date/time to UTC.

Installation

cargo install tu

Usage

Usage: tu <natural time/duration>

Examples:
  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:00Z

This is especially useful in combination with other tools like TaskLite:

# Bash
tasklite add "Buy bike" due:$(tu 2 week)
# Fish
tasklite add "Buy bike" due:(tu 2 week)
  • 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.

Dependencies

~1MB
~19K SLoC