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

Inconsistency between date and datetime #176

Open
jonathan-s opened this issue May 23, 2019 · 9 comments
Open

Inconsistency between date and datetime #176

jonathan-s opened this issue May 23, 2019 · 9 comments

Comments

@jonathan-s
Copy link

The following code.

mayaobj = maya.parse('12/12/12')
print(mayaobj.datetime())
print(mayaobj.date)

Date requires a method, whereas date is a property. In my humble opinion it would be better if both were a method or both were a property.

@ashwineaso
Copy link

But the intention is that mayaobj.datetime() returns a timezone aware/ not aware MayaDT object (based on the arguments passed), and date is a property of it. So the current implementation is accurate. Right?

@timofurrer
Copy link
Collaborator

@ashwineaso that's kinda correct. However, the date, day, month, ..., properties actually take the date() from the datetime() method. So that's also timezone aware and part of the datetime().

So I think I agree with @jonathan-s, but don't really want to break the interface - any other opinions?

@jonathan-s
Copy link
Author

jonathan-s commented Jul 7, 2019 via email

@timofurrer
Copy link
Collaborator

Yes, that's for sure. maya isn't even in a API stable release yet - we still have that zero as major version ;)

I'll check the usages on GitHub - I'll get back to it.

@github-actions
Copy link

github-actions bot commented Sep 6, 2019

This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale label Sep 6, 2019
@timofurrer timofurrer removed the stale label Sep 6, 2019
@jonathan-s
Copy link
Author

jonathan-s commented Sep 6, 2019 via email

@timofurrer
Copy link
Collaborator

That's why I removed the label ;)

@github-actions
Copy link

github-actions bot commented Nov 5, 2019

This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale label Nov 5, 2019
@timofurrer timofurrer removed the stale label Nov 5, 2019
@github-actions
Copy link

github-actions bot commented Jan 4, 2020

This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale label Jan 4, 2020
@timofurrer timofurrer reopened this May 20, 2020
@timofurrer timofurrer removed the stale label May 20, 2020
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

3 participants