Skip to content

Conversation

@pgammans
Copy link

The in build DATETIME function has support for python accepting datetime.datetime and datetime.date objects.
This PR extends this support and to include datetime.time.

Copy link
Member

@eemeli eemeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies, this should've really gotten merged ages ago.

@pgammans, there are a few conflicts with changes made on the main branch, would you be willing to take care of those or would you like me to do so? If you were to enable edits by maintainers, that would be a bit easier.

Comment on lines +303 to +304
if 'dateStyle' in kwargs and not isinstance(self, (datetime, date)):
raise TypeError("dateStyle option can only be specified for datetime or time instances, not date instance")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if 'dateStyle' in kwargs and not isinstance(self, (datetime, date)):
raise TypeError("dateStyle option can only be specified for datetime or time instances, not date instance")
if 'dateStyle' in kwargs and not isinstance(self, (datetime, date)):
raise TypeError("dateStyle option can only be specified for datetime or date instances, not time instance")

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

Successfully merging this pull request may close these issues.

2 participants