-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add datetime provider for
bn_BD
(#1518)
* Add bn_bd package in date_time with test. * Remove extra trailing spaces.
- Loading branch information
1 parent
b6bb564
commit dc2c301
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from .. import Provider as DateTimeProvider | ||
|
||
|
||
class Provider(DateTimeProvider): | ||
|
||
DAY_NAMES = { | ||
"0": "রবিবার", | ||
"1": "সোমবার", | ||
"2": "মঙ্গলবার", | ||
"3": "বুধবার", | ||
"4": "বৃহস্পতিবার", | ||
"5": "শুক্রবার", | ||
"6": "শনিবার", | ||
} | ||
|
||
MONTH_NAMES = { | ||
"01": "জানুয়ারি", | ||
"02": "ফেব্রুয়ারি", | ||
"03": "মার্চ", | ||
"04": "এপ্রিল", | ||
"05": "মে", | ||
"06": "জুন", | ||
"07": "জুলাই", | ||
"08": "আগস্ট", | ||
"09": "সেপ্টেম্বর", | ||
"10": "অক্টোবর", | ||
"11": "নভেম্বর", | ||
"12": "ডিসেম্বর", | ||
} | ||
|
||
def day_of_week(self): | ||
day = self.date("%w") | ||
return self.DAY_NAMES[day] | ||
|
||
def month_name(self): | ||
month = self.month() | ||
return self.MONTH_NAMES[month] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters