Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if date is valid python

class date_tools:    
    def check_date(self, month, day, year):
        '''test to see whether the date falls within the scope of a legitimate date'''
        try:
            datetime.datetime(year, month, day)
            return "Valid"
        except ValueError:
            return "Invalid"
 
PREVIOUS NEXT
Tagged: #check #date #valid #python
ADD COMMENT
Topic
Name
1+9 =