adafruit / adafruit/Adafruit_CircuitPython_datetime

Cannot add 'date' and 'timedelta' types

Open
#17 2 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
4
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.