Natural Language Dates

by Argentina Ortega Sainz
5
4
3
2
1
Score: 64/100

Description

Category: Productivity Tools

The Natural Language Dates plugin streamlines the use of dates and times in Obsidian by enabling natural language parsing. Users can type expressions like 'today,' 'next week,' or '5 days ago,' which the plugin converts into formatted date links. Features include a date picker, customizable formatting options, and integration with Obsidian URIs for opening daily notes. It supports multiple commands, such as inserting current dates or parsing selected text into date links.

Reviews

No reviews yet.

Stats

648
stars
487,170
downloads
67
forks
2,019
days
675
days
890
days
38
total PRs
10
open PRs
8
closed PRs
20
merged PRs
128
total issues
61
open issues
67
closed issues
0
commits

Latest Version

2 years ago

Changelog

README file from

Github

Natural Language Dates in Obsidian

Insert timestamps and cross-link your daily notes with the flexibility of natural language. NLDates provides a suite of tools that makes working with dates and times within Obsidian frictionless.

Features

If a date is not recognized, the link won't be created.

Date Autosuggest

Expand dates using natural language inline within the editor view.

Typing @today Enter will automatically be expanded to the current date. Press Shift at the same time to keep the input text as an alias (e.g. @today[[202112-27|today]]).

Configuration

Setting Description Default
Enable/Disable A global toggle to enable or disable the autosuggest Enabled
Trigger phrase Character(s) required to open the autosuggest @
Insert as link? Dates will be inserted as wikilinks (i.e. [[<date>]]) Yes

nldates URI Action

It's now possible to use the Obsidian URI to open daily notes using natural language by using the nldates action obsidian://nldates?day=<date here>. Don't forget to encode space characters appropriately.

obsidian://nldates Parameter Description
day natural language date string
newPane open note in new pane, default is yes

Commands and Hotkeys

nldates adds a few commands to work with dates in natural language. You can add custom hotkeys for them by going to Settings > Hotkeys and filtering by Natural Language Dates (Note that hotkeys are unset by default starting on v0.4.1).

Natural Language Dates: Date Picker

Opens the date picker menu

Other Commands
Setting Description Default
Insert current date Inserts the current date, using the format specified in the settings menu YYYY-MM-DD
Insert current time Inserts the current time, using the format specified in the settings menu HH:mm
Insert current date and time Inserts the current date, using the format specified in the settings menu YYYY-MM-DD HH:mm
Parse natural language date Parses the selected text as a natural language date. Replaces selected text with an obsidian link to the parsed date in the format specified in the settings menu. For single-word dates (e.g. today, tomorrow, friday, etc.), it's possible to use the command without selecting the word first. It's also possible to use dates like Nov9, 25Dec to use this trick. [[YYYY-MM-DD]]
Parse natural language time Parses the selected text as a natural language time. Replaces selected text with the parsed time stamp in the format specified in the settings menu. You can try with any of the standard times, i.e. now, in 15min, in 1h, 5min ago, etc. HH:mm
Parse natural language date (as link) Parses the selected text as a natural language date. Replaces selected text with a standard markdown link to the parsed date in the format specified in the settings menu [selected text](YYYY-MM-DD)
Parse natural language date (as plain text) Parses the selected text as a natural language date. Replaces selected text with a plain text parsed date in the format specified in the settings menu YYYY-MM-DD

Note: You can of course add hotkeys to each of these commands.

Usage

Examples

The parser supports most date/time formats, including:

  • Today, Tomorrow, Yesterday, Last Friday, etc
  • 17 August 2013 - 19 August 2013
  • This Friday from 13:00 - 16.00
  • 5 days ago
  • 2 weeks from now
  • Sat Aug 17 2013 18:40:39 GMT+0900 (JST)
  • 2014-11-30T08:15:30-05:30

Demo

Note: The parser will replace all the selected text, meaning that in a sentence you should only select the dates to be parsed and not the full sentence.
In the example sentence Do this thing by tomorrow, only the word tomorrow should be selected. Alternatively, keep in mind that you can place your cursor on or next to the word tomorrow, and it will be replaced:

How to install

In Obsidian go to Settings > Third-party plugins > Community Plugins > Browse and search for Natural Language Dates.

Manual installation

Unzip the latest release into your <vault>/.obsidian/plugins/ folder.

About

Powered by the chrono library and some custom parsing.

Custom Parsing

The only behaviours I changed were the following:

Write Date
next week next Monday
next [month] 1st of next month
mid [month] 15th of the month
end of [month] last day of the month

For Developers

NLDates provides an interface for you to parse natural language dates in your plugin. The parsedDate() function is available on the NaturalLanguageDates plugin instance. It has the following signature:

interface NLDResult {
  formattedString: string;
  date: Date;
  moment: Moment;
}

function parseDate(date: string): NLDResult;
  • The formattedString will return the date formatted according to the settings of nldates and without the square brackets.
  • The date object is what is returned by the parseDate method of the custom parser (using the chrono package).
  • The moment object is created with the date object.

Example Usage

const nldatesPlugin = obsidianApp.plugins.getPlugin("nldates-obsidian");
const parsedResult = nldatesPlugin.parseDate("next year");
console.log(parsedResult.moment.format("YYYY")); // This should return 2021

Typical String Formats and Tokens

Input Example Description
YYYY 2014 4 or 2 digit year. Note: Only 4 digit can be parsed on strict mode
YY 14 2 digit year
Y -25 Year with any number of digits and sign
Q 1..4 Quarter of year. Sets month to first month in quarter.
M MM 1..12 Month number
MMM MMMM Jan..December Month name in locale set by moment.locale()
D DD 1..31 Day of month
Do 1st..31st Day of month with ordinal
DDD DDDD 1..365 Day of year
X 1410715640.579 Unix timestamp
x 1410715640579 Unix ms timestamp
gggg 2014 Locale 4 digit week year
gg 14 Locale 2 digit week year
w ww 1..53 Locale week of year
e 0..6 Locale day of week
ddd dddd Mon...Sunday Day name in locale set by moment.locale()
GGGG 2014 ISO 4 digit week year
GG 14 ISO 2 digit week year
W WW 1..53 ISO week of year
E 1..7 ISO day of week

For further information, see: moment.js docs.

Manipulating the moment instance

If you need, you can further manipulate or format the moment object, for example:

const nldatesPlugin = obsidianApp.plugins.getPlugin("nldates-obsidian");
const nextYear = nldatesPlugin.parseDate("next year");

console.log(nextYear.moment.format("YYYY")); // This should return 2021
console.log(nextYear.moment.fromNow()); // "In two months"

const thisEvening = nldatesPlugin.parseDate("today at 21:00");
console.log(thisEvening.moment.add(1, "hour")); // This would change the Moment to 22:00

Note that if you manipulate the parsedResult.moment, the date and formattedString won't be updated. If you don't want to alter the parsedResult.moment, you should clone it. Read more about that on the moment.js docs site.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Homepage
5 years ago by mirnovov
An Obsidian plugin that opens a specified note, canvas, or workspace on startup, instead of the most recent one.
Reading Time
6 years ago by avr
Digital Garden
4 years ago by Ole Eskild Steensen
Editor Width Slider
3 years ago by @MugishoMp
With this plugin you can set the line width of the editor in obsidian.
CSS Editor
3 years ago by Zachatoo
Edit CSS snippets in Obsidian.
Calendar Bases
a month ago by Edrick Leong
Adds a calendar layout to bases so you can display notes with dates in an interactive calendar view.
Smart Second Brain
2 years ago by Leo310, nicobrauchtgit
An Obsidian plugin to interact with your privacy focused AI-Assistant making your second brain even smarter!
Sheets Extended
3 years ago by NicoNekoru
Plugin that adds features to tables in obsidian including merging, vertical headers, and custom css
Handwritten Notes
3 years ago by FBarrCa
Obsidian Handwritten Notes Plugin
TimeStamper
4 years ago by Martin Eder
A plugin for Obsidian to quickly insert customized date- and time-stamps to the currently active note
Chronos Timeline
a year ago by Claire Froelich
Render interactive timelines in your Obsidian notes from simple Markdown.
Epub Importer
2 years ago by aoout
Import EPUB files as Markdown.
SystemSculpt AI
2 years ago by SystemSculpt.com
Enhance your Obsidian App experience with AI-powered tools for note-taking, task management, and much, MUCH more.
Dynamic Outline
a year ago by theopavlove
Adds a customizable GitHub-like floating table of contents to Obsidian.
Simple RSS
3 years ago by Monnierant
File path to URI
5 years ago by Michal Bureš
Convert file path to uri for easier use of links to local files outside of Obsidian
OZ Calendar
3 years ago by Ozan Tellioglu
Jump-to-Date
5 years ago by TfTHacker
Jump to a date via a convenient popup form. This plugin is a part of the Obsidian42 family of Obsidian plugins.
Vault Changelog
5 years ago by Badr Bouslikhin
An Obsidian plugin to maintain a changelog of recently edited notes
Dangling links
5 years ago by Graydon Hoare
obsidian plugin for displaying dangling links
Quiz Generator
2 years ago by Edward Cui
Generate interactive flashcards from your notes using models from OpenAI (ChatGPT), Google (Gemini), Ollama (local LLMs), and more. Or manually create your own to use with the quiz UI.
Marp
3 years ago by JichouP
Plugin to use Marp with Obsidian
Pomodoro
5 years ago by Tokuhiro Matsuno
Date Inserter
2 years ago by namikaze-40p
An Obsidian plugin that lets you insert a date at the cursor position using a calendar.
PDF break page
2 years ago by CG
Plugin for obsidian that adding shortcuts to create breakpages for pdf exports.
Copy Image
2 years ago by Felipe D.S. Lima
Easily copy image to clipboard by right clicking image.
Timer
3 years ago by Marius Wörfel
Obsidian plugin, which allows you to measure time.
Improved Random Note
3 years ago by ShockThunder
Better Math in Callouts & Blockquotes
2 years ago by Ryota Ushio
An Obsidian plugin to add better Live Preview support for math rendering inside callouts & blockquotes.
Rich Foot
2 years ago by Justin Parker
🦶 Obsidian plugin that adds backlink/outlink tags and created/modified dates to the footer of your notes
Metadata Hider
2 years ago by Benature
Hide metadata property if its value is empty
MLIR Syntax Highlight
3 years ago by Lewuathe
Nifty Links
3 years ago by x-Ai
Generating elegant, Notion-styled rich link cards to enhance your note-taking experience.
TickTick
3 years ago by Viduy Cheung
Obsidian-compatible Watcher for ActivityWatch
3 years ago by Grimmauld
Obsidian plugin to track user activity with ActivityWatch
Datepicker
2 years ago by Mostafa Mohamed
Datepicker widget for Obsidian.
No more flickering inline math
3 years ago by Ryota Ushio
No longer disturbed by flickering inline math in Obsidian.
Timetracker
3 years ago by Nils Dammenhayn
Obsidian plugin that adds a stopwatch whose value can be pasted into the editor
Rendered Block Link Suggestions
2 years ago by Ryota Ushio
Upgrade Obsidian's built-in link suggestions with block markdown rendering.
Quoth
4 years ago by Eric Rykwalder
Single File Daily Notes
2 years ago by Pranav Mangal
An Obsidian plugin to create and manage daily notes in a single file
Orgmode (CM6)
2 years ago by Benoit Bazard
Orgmode plugin for Obsidian
Smart Links
3 years ago by David Lynch
Multi State CheckBox Switcher
2 years ago by KubaMiszcz
Kindle Highlights Importer
2 years ago by MovingMillennial
Text Block Timer
10 months ago by frankthwang
Flashcard Generator
3 years ago by ChloeDia
Obsidian Plug-in to automatically create a set of questions/answers on your notes !
Broken Links
2 years ago by ipshing
Vault 2 Book
3 years ago by Mitra98t
Obsidian plugin to convert vault to a complete pdf with Table Of Content
AI Tools
3 years ago by solderneer
Adding powerful semantic search, generative answers, and other AI tools to Obsidian, using Supabase + OpenAI.
SamePage
3 years ago by SamePage
Code Block Labels
4 years ago by Sean Bowers
Provides labels for codeblocks in Obsidian
TinyPNG Image
3 years ago by ckt1031
Obsidian plugin for compressing images with TinyPNG
Exercises
3 years ago by AlexCCavaco
Create Interactive Exercises along side your Obsidian Notes
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
File indicators
2 years ago by Jakob
Add custom indicators to the file explorer.
Publish to Steemit
4 years ago by anpigon
Post directly to your Steemit from Obsidian.
Waka time box
3 years ago by complexzeng
BuJo Bullets
a year ago by Will Olson
Alternate checkbox types for Obsidian to support Bullet Journal bullets
Image Classify Paste
2 years ago by tianfx
MemoChron
a year ago by Michalis Efstratiadis
Calendar integration and note creation with support for public iCalendar URLs.
TODO Wrangler
3 years ago by Jeel Shah
An obsidian plugin to wrangle your Todos and put them in their place.
File Publisher
3 years ago by Devin Sackett
Edit MDX
2 years ago by Tim Peters
Create and edit mdx files in Obsidian.md as if they were md files.
Memos Sync
2 years ago by RyoJerryYu
Syncing Memos to Obsidian daily note. Fully compatible with official Daily Notes plugin, Calendar plugin and Periodic Notes plugin.
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
Feeds
2 years ago by LukeMT, pashashocky, madx
Magic feeds dataview query for obsidian
File Index
2 years ago by Steffo
Obsidian plugin to create a metadata file about the files present in the Vault
Random Number Generator
2 years ago by iRewiewer
Gives you a random number
Barcode Generator
2 years ago by noxonad
A barcode generator for obsidian.
Git File Explorer
2 years ago by Mateus Molina
Minidoro
4 months ago by Shakti Sampad Swain
Minidoro is a minimalist Pomodoro timer that lives right in your Obsidian header. It's designed to be simple, unobtrusive, and fully customizable.
RSS Copyist
2 years ago by aoout
Get the RSS articles as notes.
Days Since
2 years ago by gndclouds
A plugin to show the number of days since a given date.
Sort Frontmatter
2 years ago by Kanzi
Sort frontmatter automatically
Easy Timeline
a year ago by Romeliun
The Easy Timeline plugin for Obsidian allows you to create timelines easily.
LaTeX-OCR
2 years ago by Jack Barker
KoReader Highlight Importer
a year ago by Tahsin Kocaman
Imports highlights and metadata from KoReader into Obsidian notes
Adjacency Matrix Exporter
2 years ago by danielegrazzini
Create a numerical adjacency matrix of your Vault in two ways: Absolute and Normalized
short tab name
2 years ago by Shumpei Tanaka
a plugin of obsidian for to change showing tab name to short
Page Scroll
2 years ago by triski
Obsidian Page Up|Down|Top|Bottom
Blockreffer
2 years ago by tyler.earth
An Obsidian plugin to search and embed blocks with ^block-references (aka ^block-ids)
Sidebar Resizer
2 years ago by Jeet Sukumaran
ai-writer
2 years ago by Donovan Ye
A plugin for Obsidian that uses AI to help you write better and faster.
Fight Note
2 years ago by Dmitry Loac
Obsidian Plugin for shows Tekken notation into an easy-to-read form.
Focus Tracker
2 years ago by Jeet Sukumaran
Link to Verse
2 years ago by Alberto Sesiliano (aygjiay)
Update Time Updater
2 years ago by MURATAGAWA Kei
Obsidian plugin to update the 'update time' element when saving or manually.
Rapid AI
2 years ago by Rapid AI
AI Assistant for selected text and generating content with Markdown. Shortcuts and quick action buttons provide instant AI assistance. It provides a high availability API for unlimited Chat GPT request rates, so you can ensure smooth work for any workload.
Open Interpreter
2 years ago by Mike Bird
The power of Open Interpreter in your Obsidian vault
Truth Table+
2 years ago by Maximilian Schulten
This is the repository of an Obsidian.md plugin that allows users to create truth tables via the command palette.
Browser Interface
2 years ago by Jason Lieb
An obsidian plugin that pairs with a chrome extension to manage your tabs in obsidian.
Pia viewer
2 years ago by dldisud
Inline Code Copy
a year ago by Hongchen Lin
Epiphany
2 years ago by Epiphany
URI Converter
a year ago by wenlzhang
An Obsidian plugin to convert Obsidian URIs to Obsidian internal links.
Header Counter
2 years ago by Nancy Lee
Click Hint
a year ago by kbwo
ShaahMaat-md
a year ago by Mihail Kovachev
Share via Notepad Tab
2 years ago by Iulian Onofrei
Replicate
a year ago by Sébastien Dubois
Integrate Replicate.com with Obsidian
Note Placeholder
a year ago by XZSt4nce
Replaces text of note link to placeholder in view mode.
Idle Monitor
a year ago by alberto98fx
A plugin to improve your productivity