class TenderDate_validation: STATE=[] def __init__(self, cftpd, bid_deadline, canpd, pca_date): self.cftpd=cftpd self.bid_deadline=bid_deadline self.canpd=canpd self.pca_date=pca_date def Tender_Calling_Date_Contract_Award_Date(self): 'validating if Contract_Award_Date (Schema ID: pca_date) is later than the Tender_Calling_Date (Schema ID: cftpd)' if self.pca_date is not None and self.pca_date > self.cftpd: TenderDate_validation.STATE=True return TenderDate_validation.STATE else: TenderDate_validation.STATE=False return TenderDate_validation.STATE def Tender_Calling_Date_Bid_Deadline(self): 'validating if Bid_Deadline (Schema ID: bid_deadline) is later than the Tender_Calling_Date' if self.bid_deadline is not None and self.bid_deadline > self.cftpd: TenderDate_validation.STATE=True return TenderDate_validation.STATE else: TenderDate_validation.STATE=False return TenderDate_validation.STATE def Tender_Calling_Date_Award_Notice_Date(self): 'validating if Award_Notice_Date (Schema ID: canpd) is later than the Tender_Calling_Date' if self.canpd is not None and self.canpd > self.cftpd: TenderDate_validation.STATE=True return TenderDate_validation.STATE else: TenderDate_validation.STATE=False return TenderDate_validation.STATE # This is just for the sake of testing firstcontract=TenderDate_validation('22-01-2009', '10-02-2009', '20-02-2009', '28-02-2009' ) firstcontract.Tender_Calling_Date_Contract_Award_Date()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question