Package: pybengali
PYBENGALIpybengali is a python3 package for Bengali DateTime and Bengali numeric number conversation and many more. This package can be used with any python framework like Django, Flask, FastAPI, and others. pybengali is OS Independent, It can be used on any operating system Linux/Unix, Mac OS and Windows.Available FeaturesFeatures available in pybengali:List of Bengali NumbersList of Bengali MonthsList of Bengali WeekdaysList of Bengali SeasonsBengali YearBengali WeekdayBengali DateBengali TodayBengali TomorrowBengali YesterdayBengali Past DateBengali Future DateBengali TimesinceConvert English Month Name to BengaliConvert English Numeric Number to Bengali Numeric NumberInstallation$pipinstallpybengaliUsageGet Bengali Today:importpybengalitoday=pybengali.today()print(today)# Output: {'date': '১৯', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'সোমবার'}today=pybengali.today(day="04",month="10",year="2022")print(today)# Output: {'date': '১৯', 'month': 'আশ্বিন', 'year': '১৪২৯', 'season': 'শরৎ', 'weekday': 'মঙ্গলবার'}Get Bengali Tomorrow and Yesterday:importpybengalitomorrow=pybengali.tomorrow()print(tomorrow)# Output: {'date': '২০', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'মঙ্গলবার'}yesterday=pybengali.yesterday(day="04",month="10",year="2022")print(yesterday)# Output: {'date': '১৮', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'রবিবার'}Get Bengali Timesince:importpybengalitimesince=pybengali.timesince(day="04",month="10",year="2019")print(timesince)# Output: ২ বছর আগেGet Bengali Past or Future Date With Number of Days To Go Back or Froward :importpybengali# Past Datepast_date=pybengali.past_date('2')print(past_date)# Output: {'date': '১৭', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'শনিবার'}# Future Datefuture_date=pybengali.future_date('2')print(future_date)# Output: {'date': '২১', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'বুধবার'}Get Bengali Year:importpybengaliyear=pybengali.get_year(day="04",month="10",year="2021")print(year)# Output:  ১৪২৮Get Bengali Weekday:importpybengaliweekday=pybengali.get_weekday(day="04",month="10",year="2021")print(weekday)# Output:  সোমবারConvert English Numeric Number to Bengali Numeric Number:importpybengalibengali_digit=pybengali.convert_e2b_digit("10")print(bengali_digit)# Output:  ১০Convert English Month  to Bengali Name:importpybengalibengali_name=pybengali.eng_month_to_bengali("1")print(bengali_name)# Output:  জানুয়ারীGet List of Bengali Numbers:importpybengalinumbers=pybengali.bengali_numbers()print(numbers)# Output:  ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯']Get List of Bengali Months:importpybengalimonths=pybengali.bengali_months()print(months)# Output:  ['পৌষ', 'মাঘ', 'ফাল্গুন', 'চৈত্র', 'বৈশাখ', 'জ্যৈষ্ঠ', 'আষাঢ়', 'শ্রাবণ', 'ভাদ্র', 'আশ্বিন', 'কার্তিক', 'অগ্রহায়ণ']# Months sequence Is accroding to English calender.Get List of Bengali Weekdays:importpybengaliweekdays=pybengali.bengali_weekdays()print(weekdays)# Output:  ['সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার', 'রবিবার']# weekdays sequence Is accroding to English calender.Get List of Bengali Seasons:importpybengaliseasons=pybengali.bengali_seasons()print(seasons)# Output:  ['শীত', 'বসন্ত', 'গ্রীষ্ম', 'বর্ষা', 'শরৎ', 'হেমন্ত']# seasons sequence Is accroding to English calender.*pybengali is build based on Bengali calendar which was officially adopted in Bangladesh in 1987 and All the rules fromBengali_calendarsto convert Gregorian date to Bangla date. *ContributeIf you face any problem feel free to open issue.ContactIf you have any suggestion:
Email:pyshawon@gmail.comFacebook:https://www.facebook.com/pyshawon/