Example #1
0
def bangla_date(eng_date, show_time=True):
    beng_date = bdate(eng_date)
    # beng_date = '%(day)02d-%(month)02d-%(year)4d' % (beng_date)
    beng_date['month'] = BANGLA_MONTHS[beng_date['month']]
    beng_date = '%(day)d %(month)s, %(year)d' % (beng_date)
    if show_time:
        beng_date += '; %02d:%02d' % (eng_date.hour, eng_date.minute)

    return beng_date
Example #2
0
def bangla_today(zone):
    from pytz import timezone

    zone = timezone(zone)
    today = datetime.datetime.today()
    today = zone.localize(today)
    today = bdate(today)
    today = u'%02d %s, %4d বঙ্গাব্দ' % (today['day'],
                                 BANGLA_MONTHS[today['month']],
                                 today['year'])
    return bangla_number(today)