Date manipulations can also be performed using Python using the "datetime" module and using the "date" class in it.
1. MINYEAR : — displays the minimum year that can be represented using a date class.
2. MAXYEAR : — displays the maximum year that can be represented using the date class.
Minimum representable year is: 1 Maximum representable year is: 9999
3. date (yyyy-mm-dd) : — this function returns a string with the passed arguments in year, month and date order.
4. today () : — returns the date of the current day in yyyy-mm-dd format.
The represented date is: 1997-04-01 Present date is: 2016-08-02
5. fromtimestamp (sec) : — Returns a date calculated in seconds since the time specified in the arguments.
6. min () : — returns the minimum date that can be represented by the date class.
7. max () : — returns the maximum date that can be represented by the date class.
The calculated date from seconds is: 1970- 02-09 Minimum representable date is: 0001-01-01 Maximum representable date is: 9999-12-31
This article courtesy of Manjeet Singh . If you are as Python.Engineering and would like to contribute, you can also write an article using contribute.python.engineering or by posting an article contribute @ python.engineering. See my article appearing on the Python.Engineering homepage and help other geeks.
Please post comments if you find anything wrong or if you would like to share more information on the topic discussed above.