Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

timedelta

>>> import datetime
>>> d1 = datetime.date.today()
>>> from dateutil.relativedelta import relativedelta
>>> d1 + relativedelta(months=1)
datetime.date(2012, 4, 8)

>>> d2 = datetime.date(year=2012,month=1,day=31)
>>> d2 + relativedelta(months=1)
datetime.date(2012, 2, 29)
Comment

PREVIOUS NEXT
Code Example
Python :: pychamrfind and replace 
Python :: python set remove if exists 
Python :: turn false true column into 0 1 pandas 
Python :: discordpy get role by id 
Python :: delete migrations django and start over deployment heroku 
Python :: select a range of rows in pandas dataframe 
Python :: pandas iterate rows 
Python :: python list prime numbers 
Python :: how to fill nan values in pandas 
Python :: pandas create column if equals 
Python :: pandas change order of columns in multiindex 
Python :: max date by group pandas 
Python :: NumPy unique Example Get the counts of each unique value 
Python :: how to open a file with python 
Python :: django include all columns admin show 
Python :: python comment block 
Python :: convert list of list to list python 
Python :: python logging into two different files 
Python :: loop over twodimensional array python 
Python :: dataframein python 
Python :: np.random.normal 
Python :: python random list of integers without repetition 
Python :: colorbar font size python 
Python :: drawing arrows in tkinter 
Python :: pandas series index of value 
Python :: request headers in django 
Python :: python remove space from end of string 
Python :: Python - How To Check if a String Is a Palindrome 
Python :: split word python 
Python :: python program to add two numbers using function 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =