Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Adding a replace method to replace parts on the underlying datetime object #80

Open
masnun opened this issue Mar 10, 2016 · 1 comment

Comments

@masnun
Copy link
Contributor

masnun commented Mar 10, 2016

I was wondering if we could have a feature where we could replace the parts of the underlying datetime object. For example, I would really love to do this:

d = Delorean(timezone="US/Eastern")
d = d.replace(hour=8, minute=10)

I am currently achieving this by doing this:

d = Delorean(timezone="US/Eastern")
dt = d.datetime.replace(hour=12)
d = Delorean(dt)

But the above would be much easier. I can send a PR if this seems like a good idea.

@masnun masnun changed the title Feature Request: Using replace methods on the underlying datetime object Feature Request: Adding a replace method to replace parts on the underlying datetime object Mar 10, 2016
@myusuf3
Copy link
Owner

myusuf3 commented Mar 11, 2016

yeah if you wouldn't mind providing PR and test I would definitely be interested in merging this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants