insomnia-plugin-relative-date
v1.0.0
Published
An Insomnia plugin to insert relative dates in ISO-8601 format
Readme
Relative Date
An Insomnia plugin that allows you to insert relative dates in ISO-8601 format dynamically. No more manually updating dates in your API requests!
Features
- Supports relative date expressions like:
now + 2 daystomorrownext week2025-05-01 + 3 months
- Outputs the date in ISO-8601 format (e.g.,
2025-05-03T00:00:00.000Z). - Uses chrono-node for parsing natural language dates.
- Uses date-fns for formatting.
Installation
- Navigate to Insomnia’s plugin folder:
- Windows:
%APPDATA%\Insomnia\plugins\ - Linux/macOS:
~/.config/Insomnia/plugins/
- Windows:
- Use the command below to install the plugin:
npm install insomnia-plugin-relative-date - On the toolbar, click Tools > Reload Plugins and you're good to go!
Usage
In your request, use a Template Tag:
- Press CTRL + Enter (Windows) or CMD + Enter (Linux/macOS) to open the Template Tag dialog;
- Select the Relative Date tag from the list.
- Enter a Date Expression (e.g., now + 2 days).
The field will automatically be replaced with the computed ISO-8601 date.
Examples
{
"due_date": "{{ relative_date 'now + 5 days' }}"
}{
"reminder": "{{ relative_date '2025-01-01 + 1 month' }}"
}License
This project is licensed under the MIT License. See the LICENSE file for details.
