def _get_tasks_daily(time_from_h, time_from_m, time_to_h, time_to_m): return SchTaskDB.get_cursor({ 'date_key': 1, 'time_h': { '$gte': time_from_h, '$lte': time_to_h }, 'time_m': { '$gte': time_from_m, '$lte': time_to_m } })
def _get_tasks_monthly(time_from_h, time_from_m, time_to_h, time_to_m, day): return SchTaskDB.get_cursor({ 'date_key': 3, 'date_value': { '$in': [day] }, 'time_h': { '$gte': time_from_h, '$lte': time_to_h }, 'time_m': { '$gte': time_from_m, '$lte': time_to_m } })
def _get_tasks_yearly(time_from_h, time_from_m, time_to_h, time_to_m, day, month): return SchTaskDB.get_cursor({ 'date_key': 4, 'date_value': { '$in': [(day, month)] }, 'time_h': { '$gte': time_from_h, '$lte': time_to_h }, 'time_m': { '$gte': time_from_m, '$lte': time_to_m } })
def _get_tasks_daily(time_from_h, time_from_m, time_to_h, time_to_m): return SchTaskDB.get_cursor({'date_key': 1, 'time_h': {'$gte': time_from_h, '$lte': time_to_h}, 'time_m': {'$gte': time_from_m, '$lte': time_to_m}})
def _get_tasks_yearly(time_from_h, time_from_m, time_to_h, time_to_m, day, month): return SchTaskDB.get_cursor({'date_key': 4, 'date_value': {'$in':[(day, month)]}, 'time_h': {'$gte': time_from_h, '$lte': time_to_h}, 'time_m': {'$gte': time_from_m, '$lte': time_to_m}})
def _get_tasks_monthly(time_from_h, time_from_m, time_to_h, time_to_m, day): return SchTaskDB.get_cursor({'date_key': 3, 'date_value': {'$in':[day]}, 'time_h': {'$gte': time_from_h, '$lte': time_to_h}, 'time_m': {'$gte': time_from_m, '$lte': time_to_m}})