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

Should return an OxfordDate(datetime.datetime) #1

Open
davbo opened this issue Jan 8, 2013 · 1 comment
Open

Should return an OxfordDate(datetime.datetime) #1

davbo opened this issue Jan 8, 2013 · 1 comment

Comments

@davbo
Copy link
Contributor

davbo commented Jan 8, 2013

Rather than returning a dictionary with all the Oxfordised date attributes we should likely return a datetime subclass. Note that since datetime is immutable you don't subclass it with init but rather with new. This way we can just add a bunch of oxfordised attributes to a regular datetime object.

Makes sense no? You could even consider monkeypatching the stdlib to always return you an oxfordised date, that would be quite evil though :shipit:

@martinfilliau
Copy link
Contributor

👍 :shipit:

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