Search
 
SCRIPT & CODE EXAMPLE
 

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"
Comment

PREVIOUS NEXT
Code Example
Python :: matplotlib logarithmic scale 
Python :: read page source from text file python 
Python :: linking custom CSS in flask 
Python :: python debugger 
Python :: how to combine two arrays in python 
Python :: python turtle write 
Python :: true positive true negative manually 
Python :: factorial in python 
Python :: discord.py embeds 
Python :: django logout user 
Python :: generate new secret key django 
Python :: pandas inplace 
Python :: connecting python with database 
Python :: width and height of pil image 
Python :: python Pyramid Patterns 
Python :: open and read a file in python 
Python :: python turn off printing 
Python :: multiple values in python loop for x,y 
Python :: python writelines 
Python :: python find in largest 3 numbers in an array 
Python :: python check if all caps 
Python :: get mac address python 
Python :: where to find location of where python is installed linux 
Python :: python mahalanobis distance 
Python :: numpy inverse square root 
Python :: how to delete a file in python 
Python :: matplotlib custom legend 
Python :: how to convert cost to float in python 
Python :: make a window tkinter 
Python :: transpose matrix numpy 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =