Days Since Signup

Easy ⏱ 8 min 86% acceptance ★★★★★ 4.6
Write days_since(signup, today) where both arguments are datetime.date objects, returning the whole number of days between them. Subtracting two dates yields a timedelta — read its .days.

Examples

Example 1
Input
days_since(date(2026, 7, 1), date(2026, 7, 28))
Output
27
Explanation

The timedelta between the dates spans 27 days.

Constraints

  • Inputs are date objects, not strings.
  • Return an int.

Topics

Modules & Packagesdatetime

Companies

SalesforceAdobe

Hints

Hint 1

today - signup produces a timedelta.

Hint 2

.days extracts the integer.

Loading the Python runtime… Run executes your code and shows printed output; Submit checks your function against this problem's examples.