summaryrefslogtreecommitdiff
path: root/payments/utils.py
blob: 2d78659e03f9f26170e6a049ff5e94987ad44701 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from datetime import date

from django.utils.translation import ugettext_lazy as _


def get_month_choices():
    month_choices = [(str(x), '%02d' % (x,)) for x in range(1, 13)]
    return [('', _('Month'))] + month_choices


def get_year_choices():
    year_choices = [(str(x), str(x)) for x in range(
        date.today().year, date.today().year + 15)]
    return [('', _('Year'))] + year_choices