Jalali Dates
unlistedby Amir Meimari
Convert Gregorian dates to Jalali (Persian) dates and insert Jalali dates with {{jtoday}}-style tokens.
Jalali Dates
Convert Gregorian dates to Jalali (Persian/Shamsi) dates in Obsidian, and insert Jalali dates with {{jtoday}}-style tokens.
Features
- Convert selected text — select any text containing Gregorian dates and run
Convert selected dates to Jalali(command palette or right-click menu) to replace them in place with their Jalali equivalents. - Inline hints while typing — recognized Gregorian dates get a small, non-editable Jalali hint next to them as you type. Purely visual; your note's text is never touched.
- Quick-insert tokens — type
{{in the editor for an autocomplete menu of tokens like today, tomorrow, yesterday, and relative offsets. - Configurable output — choose the date format, Latin or Persian digits, and how ambiguous numeric dates (e.g.
05/04/2025) are interpreted.
Supported date formats
The plugin recognizes:
- Month-name dates:
July 19, 2025,19 July 2025,19th of July 2025 - ISO-like dates:
2025-07-19,2025/07/19,2025.07.19 - Numeric dates:
19/07/2025(day/month order follows the "Ambiguous date order" setting)
Only years between 1900–2100 are treated as Gregorian, so the plugin won't re-convert Jalali dates it (or you) already wrote.
Insert tokens
Type {{ in a note to trigger the suggestion menu, or write tokens manually:
| Token | Result |
|---|---|
{{jtoday}} | Today, in your configured output format |
{{jtomorrow}} | Tomorrow |
{{jyesterday}} | Yesterday |
{{jtoday+3}} | 3 days from today |
{{jtoday-2}} | 2 days ago |
{{jtoday:dddd D MMMM YYYY}} | Today, with a custom format overriding the default |
Tokens expand automatically as you finish typing them on the current line.
Output format tokens
| Token | Meaning |
|---|---|
YYYY | 4-digit year |
YY | 2-digit year |
MMMM | Persian month name |
MM | Month, zero-padded |
M | Month |
DD | Day, zero-padded |
D | Day |
dddd | Persian weekday name |
Settings
- Output format — default
YYYY/MM/DD. - Digits — Latin (
1405/04/28) or Persian (۱۴۰۵/۰۴/۲۸). - Ambiguous date order — how to read numeric dates like
05/04/2025(day-first or month-first). - Show inline Jalali hints — toggle the inline preview described above.
Installation
From the Obsidian Community Plugins browser
- Open Settings → Community plugins and disable Restricted Mode if needed.
- Browse for "Jalali Dates" and click Install, then Enable.
Manual installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest GitHub release of this repository. - Copy them into
<your vault>/.obsidian/plugins/jalali-dates/. - Reload Obsidian and enable Jalali Dates in Settings → Community plugins.
Development
npm install
npm run dev # watch mode
npm run build # type-check and produce a production main.js
The plugin conversion logic never sends data anywhere — all parsing and date math run locally in the editor.
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.