@@ -0,0 +1,1322 @@
+# Copyright (C) 2015 Google Inc., authors, and contributors %3Csee AUTHORS file%3E%0A# Licensed under http://www.apache.org/licenses/LICENSE-2.0 %3Csee LICENSE file%3E%0A# Created By: jernej@reciprocitylabs.com%0A# Maintained By: jernej@reciprocitylabs.com%0A    %0Aimport calendar%0Afrom datetime import datetime%0A%0A%0Adef get_days_in_current_month():%0A    %22%22%22Gets days in current month%0A%0A    Returns:%0A        int%0A    %22%22%22%0A    now = datetime.now()%0A    weekday, days_in_month = calendar.monthrange(now.year, now.month)%0A    return days_in_month%0A%0A%0Adef get_from_string(date, format):%0A    %22%22%22Creates a date object from given string%0A%0A    Args:%0A        date (str): date string%0A        format (str): date format specs%0A%0A    Returns:%0A        datetime%0A    %22%22%22%0A    return datetime.strptime(date, format)%0A%0A%0Adef get_month_start(date):%0A    %22%22%22Gets a date object with the date of the first of the month.%0A%0A    Args:%0A        date (datetime)%0A%0A    Returns:%0A        datetime%0A    %22%22%22%0A    return date.replace(day=1)%0A%0A%0Adef get_month_end(date):%0A    %22%22%22Gets month end of the input date object.%0A%0A    Args:%0A         date (datetime)%0A%0A    Returns:%0A        datetime%0A    %22%22%22%0A    return date.replace(day=calendar.monthrange(date.year, date.month)%5B1%5D)%0A%0A%0Adef get_current():%0A    %22%22%22Gets a date object with current date%0A%0A    Returns:%0A        datetime%0A    %22%22%22%0A    return datetime.now()%0A

Add date helpers