Posted indatetime Python modules
Replacing Elements in Dates with datetime.date.replace
Create new date objects with specific alterations to the year, month, or day using Python's datetime.date.replace() method. Retain the other components of the original date while adjusting specific elements without modifying the original object.