Skip to content

Cannot add 'date' and 'timedelta' types #17

Open
@strimmer

Description

@strimmer

I'm trying to calculate tomorrow's date.
The approach I'm taking is as follows:
adate = adafruit_datetime.date (2022, 03, 31)
delta = adafruit_datetime.timedelta(days=1)
bdate = adate + delta

I then get the following error:
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported types for add: 'date', 'timedelta'

Looking for the functionality provided by the datetime module as documented in the supported operations section here:
https://docs.python.org/3/library/datetime.html#datetime.date.day

Currently running the following Circuit Python according to boot_out.txt:
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit MagTag with ESP32S2
Board ID:adafruit_magtag_2.9_grayscale

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions