# Path: happenings/utils/common.py
# def inc_month(month, year):
# def _inc_day(year, month, day, net):
# def get_net_category_tag(req):
# def get_net(req):
# def get_category_tag(req):
# def get_qs(old_qs):
# def order_events(events, d=False):
# def get_next_and_prev(net):
# def _check_year(year, month, error, error_msg):
# def clean_year_month_day(year, month, day, net):
# def clean_year_month(year, month, month_orig):
# def check_weekday(year, month, day, reverse=False):


from calendar import LocaleHTMLCalendar, HTMLCalendar, month_name
from datetime import date
from django.conf import settings
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.dates import WEEKDAYS, WEEKDAYS_ABBR
from django.utils.html import mark_safe
from .common import get_now, get_next_and_prev
import sys
import six
        self.count = count  # defaultdict in {date:[(title1, pk1), (title2, pk2),]} format
        self.events = all_month_events
        self.request = request
        self.base_context = base_context or {}
        self._context = None

#    def add_occurrence(self):
#        try:
#            self.event.occurrence.append(self.day)
#        except AttributeError:
#            self.event.occurrence = []
#            self.event.occurrence.append(self.day)

    def get_context(self, day=None):
        if self._context is None:
            now = get_now()
            context = dict(self.base_context)
            context.update({
                'URLS_NAMESPACE': URLS_NAMESPACE,
                'CALENDAR_TIME_FORMAT': CALENDAR_TIME_FORMAT,
                'CALENDAR_HOUR_FORMAT': CALENDAR_HOUR_FORMAT,
                'calendar': self,
                'is_current_day': False,
                'now': now,
                'request': self.request,
            })
            self._context = context
        return dict(self._context)

    def check_if_cancelled(self):

# Path: happenings/utils/common.py
# def inc_month(month, year):
# def _inc_day(year, month, day, net):
# def get_net_category_tag(req):
# def get_net(req):
# def get_category_tag(req):
# def get_qs(old_qs):
# def order_events(events, d=False):
# def get_next_and_prev(net):
# def _check_year(year, month, error, error_msg):
# def clean_year_month_day(year, month, day, net):
# def clean_year_month(year, month, month_orig):
# def check_weekday(year, month, day, reverse=False):


# Path: happenings/utils/calendars.py
from calendar import LocaleHTMLCalendar, HTMLCalendar, month_name
from datetime import date
from django.conf import settings
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.dates import WEEKDAYS, WEEKDAYS_ABBR
from django.utils.html import mark_safe
from .common import get_now, get_next_and_prev
import sys
import six

        self.count = count  # defaultdict in {date:[(title1, pk1), (title2, pk2),]} format
        self.events = all_month_events
        self.request = request
        self.base_context = base_context or {}
        self._context = None

#    def add_occurrence(self):
#        try:
#            self.event.occurrence.append(self.day)
#        except AttributeError:
#            self.event.occurrence = []
#            self.event.occurrence.append(self.day)

    def get_context(self, day=None):
        if self._context is None:
            now = get_now()
            context = dict(self.base_context)
            context.update({
                'URLS_NAMESPACE': URLS_NAMESPACE,
                'CALENDAR_TIME_FORMAT': CALENDAR_TIME_FORMAT,
                'CALENDAR_HOUR_FORMAT': CALENDAR_HOUR_FORMAT,
                'calendar': self,
                'is_current_day': False,
                'now': now,
                'request': self.request,
            })
            self._context = context
        return dict(self._context)

    def check_if_cancelled(self):

        d = date(self.yr, self.mo, self.day)