Live data from Hacker News

Untitled topic

news.ycombinator.com

1–2 of 2 posts

Re: undefined

#2
cmp-natdat[0] is an nvim-cmp[1] source that autocompletes natural language dates (e.g. `@tomorrow`) and turns them into ISO dates (e.g. `2023-10-14`).

I built it because I missed this feature after moving from Notion to Obsidian[2] and writing my notes in Neovim.

Repository link: https://github.com/Gelio/cmp-natdat/

## Examples

* `@now` -> `2023-10-13 12:38`

* `@tomorrow` -> `2023-10-14`

* `@last Friday 2pm` -> `2023-10-06 14:00`

* `@Oct 8 2021` -> `2021-10-08`

* `@today 14:20` -> `2023-10-13 14:20`

## Features

* autocomplete for partially typed month names, relative dates

* supported formats:

   * `now`

   * `yesterday`, `today`, `tomorrow` with optional time

   * days of week (Monday -> Sunday), with optional `last`/`next` modifier and time

   * full dates: month, day, optional year, optional time

   * time: am/pm, or 24h format
## Installation and setup

Described in the README[3].

---

[0]: https://github.com/Gelio/cmp-natdat

[1]: https://github.com/hrsh7th/nvim-cmp

[2]: https://obsidian.md/

[3]: https://github.com/Gelio/cmp-natdat/#setup