2008/08/07

task3 : checker.py

class name : memobee_checker
the methods :
check_past(memobee_notes)
check_come(memobee_notes)
check_day(memobee_notes,day)
check_month(memobee_notes,month)
check_year(memobee_notes,year)

this task assinged to : Blaze Boy
Done : Thursday, August 07 2008

1 comment:

Emad Elsaid said...

import datetime

class memobee_checker:

def check_past(self ,memobee_notes):
past_list = []
for i in len(memobee_notes):
if memobee_notes[i].past() == True :
past_list.insert(0,memobee_notes[i])
return past_list

def check_come(self ,memobee_notes):
come_list = []
for i in len(memobee_notes):
if memobee_notes[i].past() == false :
come_list.insert(0,memobee_notes[i])
return come_list

def check_day(self ,memobee_notes ,day):
day_list = []
for i in len(memobee_notes):
if memobee_notes[i].date.day == day :
day_list.insert(0,memobee_notes[i])
return day_list

def check_month(self ,memobee_notes ,month):
month_list = []
for i in len(memobee_notes):
if memobee_notes[i].date.month == month :
month_list.insert(0,memobee_notes[i])
return month_list

def check_year(self ,memobee_notes ,year):
year_list = []
for i in len(memobee_notes):
if memobee_notes[i].date.year == year :
year_list.insert(0,memobee_notes[i])
return year_list