Skip to content
Persian Calendar
Share
Explore

icon picker
What is this?

Aside from the Gregorian Calendar System there is a widely used Persian Calendar System also known as the Jalali Calendar System which Coda does not support. This doc has a simple solution for supporting Persian Calendar System alongside the native date.
It simply includes a table of 366 records (equivalent to the amount of days in a leap year), named with auto generated columns (all formulas) mimicking the current Persian Calendar year (
1402
).
Since its a simple Coda table, you can easily convert any Gregorian Calendar Date to any part of its equivalent Persian Calendar Date (or vice versa), using lookup or filter.
This solution is useful until Coda introduces a simple way of creating custom functions (e.g. using JavaScript) that could be used in formulas. Something like VBA scripts in Microsoft Excel or user-written Google Scripts that could be used as Add-ons on Google Sheets.

2023 Update: Since this solution only allows for working in one calendar year, I added ability to easily switch Jalali years with leap year considerations.


Use Case Examples


from Gregorian:
4/21/2023
to Jalali:
@1/2/1402
(
جمعه ۱ اردیبهشت
)
from Jalali:
30/5/1402
(
دوشنبه ۳۰ مرداد
) to Gregorian:
8/21/2023
from Jalali Names:
جمعه ۱۹ خرداد
(
19/3/1402
) to Gregorian:
6/9/2023
from Jalali (picked by date) to Gregorian
0
Jalali Date
Persian Date Name
Gregorian
1
1/1/1402
سه‌شنبه ۱ فروردین
3/21/2023
2
31/6/1402
جمعه ۳۱ شهریور
9/22/2023
3
29/12/1402
سه‌شنبه ۲۹ اسفند
3/19/2024
There are no rows in this table
from Jalali (picked by name) to Gregorian
0
Persian Date Name
Looked-up Jalali Date
Gregorian
1
سه‌شنبه ۱ فروردین
1/1/1402
3/21/2023
2
جمعه ۳۱ شهریور
31/6/1402
9/22/2023
3
سه‌شنبه ۲۹ اسفند
29/12/1402
3/19/2024
There are no rows in this table
from Jalali (entered parts) to Gregorian
0
Description
Jalali Day
Jalali Month
Looked-up Jalali Date
Gregorian
1
Valid Date
1
1
1/1/1402
3/21/2023
2
Valid Date
31
6
31/6/1402
9/22/2023
3
This is an invalid Jalali Day, because there are not 31 days in the 7th month of the Jalali Calendar.
31
7
[  ]
[  ]
4
Valid Date
29
12
29/12/1402
3/19/2024
There are no rows in this table
from Gregorian (entered) to Jalali (+ parts)
0
Description
Gregorian
Jalali Date
Jalali Date Name
Month Day
Month Number
Month Name
Week Day Name
1
Invalid date. This is before the current Jalali Year.
2/20/2022
[  ]
[  ]
[  ]
[  ]
[  ]
[  ]
2
Valid Date. First year date.
3/21/2023
1/1/1402
سه‌شنبه ۱ فروردین
1
1
فروردین
سه‌شنبه
3
Valid Date. Last year date for non-leap years.
3/19/2024
29/12/1402
سه‌شنبه ۲۹ اسفند
29
12
اسفند
سه‌شنبه
4
Invalid date only if the current year is not a leap year. And valid if it is.
3/20/2024
#r366
5
Invalid date. After current year.
3/21/2024
[  ]
[  ]
[  ]
[  ]
[  ]
[  ]
There are no rows in this table

Changing the Jalali Year:

You can change the active Jalali Year for the whole JalaliCalendar table, by changing the JalaliActiveYear in the Page.

A note about TimeZones (Troubleshooting):

When you pick a date from a date picker it uses the current timezone of the doc and stores the value. you can adjust the JalaliBaseEpoch variable accordingly to reflect your timezone, otherwise filters and lookups may not find the date in the JalaliCalendar table. Also do not forget to update all of your dates after changing the timezone of the doc.

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.