Created
November 24, 2014 18:40
-
-
Save mlissner/52f2a6fc681846865b00 to your computer and use it in GitHub Desktop.
Another attempt at nuking stftime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import warnings | |
class CleanDateTime(datetime.datetime): | |
def strftime(self, *args, **kwargs): | |
# warnings.warn('strftime is deprecated', DeprecationWarning, | |
# stacklevel=2) | |
return super(CleanDateTime, self).strftime(*args, **kwargs) | |
class CleanDate(datetime.date): | |
def strftime(self, *args, **kwargs): | |
# warnings.warn('strftime is deprecated', DeprecationWarning, | |
# stacklevel=2) | |
return super(CleanDate, self).strftime(*args, **kwargs) | |
datetime.datetime = CleanDateTime | |
datetime.date = CleanDate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment