Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 34 additions & 25 deletions arrow/locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -3385,33 +3385,33 @@ class FarsiLocale(Locale):

month_names = [
"",
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"ژانویه",
"فوریه",
"مارس",
"آوریل",
"مه",
"ژوئن",
"ژوئیه",
"اوت",
"سپتامبر",
"اکتبر",
"نوامبر",
"دسامبر",
]
month_abbreviations = [
"",
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
"ژانویه",
"فوریه",
"مارس",
"آوریل",
"مه",
"ژوئن",
"ژوئیه",
"اوت",
"سپتامبر",
"اکتبر",
"نوامبر",
"دسامبر",
]

day_names = [
Expand All @@ -3424,7 +3424,16 @@ class FarsiLocale(Locale):
"شنبه",
"یکشنبه",
]
day_abbreviations = ["", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
day_abbreviations = [
"",
"دو شنبه",
"سه شنبه",
"چهارشنبه",
"پنجشنبه",
"جمعه",
"شنبه",
"یکشنبه",
]


class HebrewLocale(Locale):
Expand Down
7 changes: 7 additions & 0 deletions tests/test_locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,13 @@ def test_timeframes(self):
assert self.locale._format_timeframe("months", 2) == "2 ماه"
assert self.locale._format_timeframe("years", 2) == "2 سال"

def test_weekday(self):
fa = arrow.Arrow(2024, 10, 25, 17, 30, 00)
assert self.locale.day_name(fa.isoweekday()) == "جمعه"
assert self.locale.day_abbreviation(fa.isoweekday()) == "جمعه"
assert self.locale.month_name(fa.month) == "اکتبر"
assert self.locale.month_abbreviation(fa.month) == "اکتبر"


@pytest.mark.usefixtures("lang_locale")
class TestNepaliLocale:
Expand Down