meysam81 / timeframe

Python library datetime wrapper for calculating time ranges, manipulations and calculations
https://pypi.org/project/timeframe/
MIT License
8 stars 1 forks source link

added shift method #7

Open topknopp opened 2 years ago

topknopp commented 2 years ago

Added a method to shift a timeframe by a given timedelta.

meysam81 commented 2 years ago

Hey @topknopp Thanks for your collaboration & sorry for the very late response. I didn't see this PR until a couple of weeks ago.

Back to the PR, I suggest adding the functionality using magic functions, as this library is already heavily relying on them. For this functionality, you can implement __lshift__ and __rshift__.

https://docs.python.org/3/reference/datamodel.html#object.__lshift__

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information