Every line of 'date fns difference in days' 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.
517 def daysbetween(day1, month1, year1, day2, month2, year2): 518 """Given two dates it returns the number of days between them. 519 If date1 is earlier than date2 then the result will be positive.""" 520 return daycount(year2, month2, day2) - daycount(year1, month1, day1)
26 def days_ago(days): 27 """ 28 Returns datetime object 29 """ 30 return datetime.date.today() - datetime.timedelta(days=days)