karfekr8k downloadsPersian Calendar for managing periodic notes based on persian solar (shamsi) calendar.
This plugin adds the Solar Hijri calendar alongside the Gregorian and Lunar Hijri calendars to Obsidian, offering Iranian users a more pleasant journaling experience.
You can install this plugin by searching for Persian Calendar in Obsidian's Community plugins.
You can visit the Releases section of this GitHub page, download the plugin's executable
files -main.js, manifest.json and styles.css- and move them to the following path:
[Your Vault Address]/.obsidian/plugins/persian-calendar
You can set the paths for your calendar notes dynamically.
| Dynamic Path | Sample Value | Description |
|---|---|---|
jYYYY |
1404 | Four-digit Solar Hijri year |
jQQQQ |
پاییز (Autumn) | Full name of the Solar Hijri season |
jQQ |
03 | Two-digit Solar Hijri season number |
jQ |
3 | Solar Hijri season number |
jMMMM |
آذر (Azar) | Full name of the Solar Hijri month |
jMM |
09 | Two-digit Solar Hijri month number |
jM |
9 | Solar Hijri month number |
Using the @ symbol, you can quickly reference your calendar notes.
امروز، دیروز، فردا، پریروز، پسفرداروز بعد، روز قبلاین هفته، هفته قبل، هفته بعداین ماه، ماه قبل، ماه بعداین فصل، فصل قبل، فصل بعدامسال، سال قبل، سال بعدYou can also select the desired phrase in the text and link it to the corresponding note by executing the related command.
By inserting the following placeholders into your note templates, you can include your desired text in the final result.
By typing {{}} you can receive suggestions for choosing your placeholder.
Only replaced in daily notes.
| Placeholder | Sample Output | Description |
|---|---|---|
{{تاریخ شمسی یادداشت}} |
1404-11-30 | Solar Hijri date of the daily note |
{{تاریخ میلادی یادداشت}} |
2026-02-19 | Gregorian date of the daily note |
{{تاریخ قمری یادداشت}} |
1447-09-01 | Lunar Hijri date of the daily note |
{{روز هفته یادداشت}} |
پنجشنبه (Thursday) | Name of the day of the week |
{{روز ماه یادداشت}} |
30 | Day of the month |
{{مناسبت یادداشت}} |
Event text | Events of the daily note's date |
Work in daily notes and weekly notes.
| Placeholder | Sample Output | Description |
|---|---|---|
{{هفته یادداشت}} |
1404-W49 | Week identifier |
{{اول هفته}} |
2026-02-14 | Start date of the week (Gregorian) |
{{آخر هفته}} |
2026-02-20 | End date of the week (Gregorian) |
Work in daily notes and monthly notes.
| Placeholder | Sample Output | Description |
|---|---|---|
{{ماه یادداشت}} |
1404-11 | Month identifier |
{{نام ماه یادداشت}} |
بهمن (Bahman) | Name of the Solar Hijri month |
{{اول ماه}} |
2026-01-21 | Start date of the month (Gregorian) |
{{آخر ماه}} |
2026-02-19 | End date of the month (Gregorian) |
Work in daily notes, monthly notes, and seasonal notes.
| Placeholder | Sample Output | Description |
|---|---|---|
{{فصل یادداشت}} |
1404-S4 | Season identifier |
{{نام فصل یادداشت}} |
زمستان (Winter) | Name of the season |
{{اول فصل}} |
2025-12-22 | Start date of the season (Gregorian) |
{{آخر فصل}} |
2026-03-21 | End date of the season (Gregorian) |
Work in daily, weekly, monthly, and yearly notes.
| Placeholder | Sample Output | Description |
|---|---|---|
{{سال یادداشت}} |
1404 | Solar Hijri year |
{{اول سال}} |
2025-03-21 | Start date of the year (Gregorian) |
{{آخر سال}} |
2026-03-20 | End date of the year (Gregorian) |
These always return today's date, regardless of the note type.
| Placeholder | Sample Output | Description |
|---|---|---|
{{تاریخ شمسی جاری}} |
1404-11-26 | Today's Solar Hijri date |
{{تاریخ میلادی جاری}} |
2026-02-15 | Today's Gregorian date |
{{تاریخ قمری جاری}} |
1447-08-26 | Today's Lunar Hijri date |
{{روز هفته جاری}} |
یکشنبه (Sunday) | Name of today's weekday |
{{روز ماه جاری}} |
26 | Today's day of the month |
{{هفته جاری}} |
1404-W49 | Current week identifier |
{{نام ماه جاری}} |
بهمن (Bahman) | Name of the current month |
{{ماه جاری}} |
1404-11 | Current month identifier |
{{نام فصل جاری}} |
زمستان (Winter) | Name of the current season |
{{فصل جاری}} |
1404-S4 | Current season identifier |
{{سال جاری}} |
1404 | Current year |
{{مناسبت جاری}} |
Event text | Today's events |
By default, calculated relative to the daily note's date; if placed in a non-daily note, they use today's date.
| Placeholder | Sample Output | Description |
|---|---|---|
{{روزهای گذشته سال}} |
334 | Days passed since the beginning of the year |
{{روزهای باقیمانده سال}} |
31 | Days remaining until the end of the year |
{{روزهای گذشته فصل}} |
58 | Days passed since the beginning of the season |
{{روزهای باقیمانده فصل}} |
31 | Days remaining until the end of the season |
{{روزهای گذشته ماه}} |
28 | Days passed since the beginning of the month |
{{روزهای باقیمانده ماه}} |
2 | Days remaining until the end of the month |
This plugin provides a public API so you can use features like date and number conversion in other plugins and scripts (such as DataviewJS or Templater).
const pcApi = app.plugins.getPlugin("persian-calendar").api;
// Number conversion
pcApi.toEnNumber("۱۲۳ تست test"); // "123 تست test"
pcApi.toFaNumber("123 تست test"); // "۱۲۳ تست test"
// Solar Hijri date conversion
pcApi.jalaliToDate(1405, 9, 13); // Equivalent Gregorian date as Date object
pcApi.jalaliToGregorian(1405, 9, 13); // {gy: 2026, gm: 12, gd: 4}
pcApi.jalaliToHijri(1405, 9, 13); // (Iran basis) {hy: 1448, hm: 6, hd: 24}
pcApi.jalaliToHijri(1405, 9, 13, { base: "umalqura" }); // (Umm al-Qura basis) {hy: 1448, hm: 6, hd: 24}
pcApi.jalaliMonthName(9); // آذر (Azar)
pcApi.jalaliMonthName(9, "en"); // Azar
pcApi.seasonName(3); // پاییز (Autumn)
pcApi.seasonName(3, "en"); // Autumn
// Gregorian date conversion
pcApi.dateToGregorian(new Date()); // {gy, gm, gd}
pcApi.gregorianToDate(2026, 12, 4); // Date object
pcApi.gregorianToJalali(2026, 12, 4); // {jy: 1405, jm: 9, jd: 13}
pcApi.gregorianToHijri(2026, 12, 4); // (Iran) {hy: 1448, hm: 6, hd: 24}
pcApi.gregorianToHijri(2026, 12, 4, { base: "umalqura" }); // (Umm al-Qura) {hy: 1448, hm: 6, hd: 24}
// Lunar Hijri date conversion (Iran basis)
pcApi.hijriToDate(1448, 6, 24); // Date object
pcApi.hijriToGregorian(1448, 6, 24); // {gy: 2026, gm: 12, gd: 4}
pcApi.hijriToJalali(1448, 6, 24); // {jy: 1405, jm: 9, jd: 13}
// Lunar Hijri date conversion (Umm al-Qura basis)
pcApi.hijriToDate(1448, 6, 24, { base: "umalqura" }); // Date object
pcApi.hijriToGregorian(1448, 6, 24, { base: "umalqura" }); // {gy: 2026, gm: 12, gd: 4}
pcApi.hijriToJalali(1448, 6, 24, { base: "umalqura" }); // {jy: 1405, jm: 9, jd: 13}
// Events
pcApi.checkHoliday(new Date()); // Is it a holiday? true/false
pcApi.dateToEvents(new Date()); // Array of {title(fa/en), categories, isHoliday}
pcApi.dateToEvents(new Date(), { base: "umalqura" }); // With Umm al-Qura basis
dateThis plugin has been developed with love, for non-commercial purposes, and under this license.
You can support our continued efforts in the following ways: