4 examples of 'python datetime add minutes' in Python

Every line of 'python datetime add minutes' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
125value: A number of 100-nanosecond ticks. The value parameter can be positive or
126 negative.
127
128 Returns: An object whose value is the sum of the date and time represented by this
129 instance and the time represented by value.
130 """
131 pass
132def AddYears(self,value):
133 """
134 AddYears(self: DateTime,value: int) -> DateTime
135
136 Returns a new System.DateTime that adds the specified number of years to the
137 value of this instance.
138
139
140 value: A number of years. The value parameter can be negative or positive.
141 Returns: An object whose value is the sum of the date and time represented by this
142 instance and the number of years represented by value.
143 """
144 pass
145@staticmethod
146def Compare(t1,t2):
147 """
148 Compare(t1: DateTime,t2: DateTime) -> int
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

171value: The object to compare to the current instance.
172 Returns: A signed number indicating the relative values of this instance and the value
173 parameter.Value Description Less than zero This instance is earlier than value.
174 Zero This instance is the same as value. Greater than zero This instance is
175 later than value.
176
177 CompareTo(self: DateTime,value: object) -> int
178
179 Compares the value of this instance to a specified object that contains a
180 specified System.DateTime value,and returns an integer that indicates whether
181 this instance is earlier than,the same as,or later than the specified
182 System.DateTime value.
183
184
185 value: A boxed object to compare,or null.
186 Returns: A signed number indicating the relative values of this instance and value.Value
187 Description Less than zero This instance is earlier than value. Zero This
188 instance is the same as value. Greater than zero This instance is later than
189 value,or value is null.
190 """
191 pass
192@staticmethod
193def DaysInMonth(year,month):
194 """
145def addSeconds(date, value):
146 """Add or subtract an amount of seconds to a given date and time.
147
148 Args:
149 date (datetime): The starting date.
150 value (int): The number of units to add, or subtract if the
151 value is negative.
152
153 Returns:
154 datetime: A new date object offset by the integer passed to
155 the function.
156 """
157 return date + timedelta(seconds=value)
14def add(self, additional_mins):
15 self.mins += additional_mins
16 self.fixup()
17 return self

Related snippets