MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / strftime

Method strftime

site-packages/matplotlib/dates.py:700–720  ·  view source on GitHub ↗

Refer to documentation for :meth:`datetime.datetime.strftime` *fmt* is a :meth:`datetime.datetime.strftime` format string. Warning: For years before 1900, depending upon the current locale it is possible that the year displayed with %x might be incorrect. F

(self, dt, fmt=None)

Source from the content-addressed store, hash-verified

698
699 @cbook.deprecated("3.0")
700 def strftime(self, dt, fmt=None):
701 """
702 Refer to documentation for :meth:`datetime.datetime.strftime`
703
704 *fmt* is a :meth:`datetime.datetime.strftime` format string.
705
706 Warning: For years before 1900, depending upon the current
707 locale it is possible that the year displayed with %x might
708 be incorrect. For years before 100, %y and %Y will yield
709 zero-padded strings.
710 """
711 if fmt is None:
712 fmt = self.fmt
713 fmt = self.illegal_s.sub(r"\1", fmt)
714 fmt = fmt.replace("%s", "s")
715 if dt.year >= 1900:
716 # Note: in python 3.3 this is okay for years >= 1000,
717 # refer to http://bugs.python.org/issue1777412
718 return cbook.unicode_safe(dt.strftime(fmt))
719
720 return self.strftime_pre_1900(dt, fmt)
721
722
723class IndexDateFormatter(ticker.Formatter):

Callers 15

test_strftime_fieldsFunction · 0.95
format_durationMethod · 0.45
update_headersMethod · 0.45
format_rfc3339Function · 0.45
saveMethod · 0.45
__str__Method · 0.45
test_parser.pyFile · 0.45
test_ybdMethod · 0.45
test_year_onlyFunction · 0.45
test_year_monthFunction · 0.45
test_year_month_dayFunction · 0.45
_isoparse_date_and_timeFunction · 0.45

Calls 3

strftime_pre_1900Method · 0.95
subMethod · 0.45
replaceMethod · 0.45

Tested by 10

test_strftime_fieldsFunction · 0.76
test_ybdMethod · 0.36
test_year_onlyFunction · 0.36
test_year_monthFunction · 0.36
test_year_month_dayFunction · 0.36
_isoparse_date_and_timeFunction · 0.36
test_parse_isodateFunction · 0.36
test_isotimeFunction · 0.36
testTimeOnlyFormatZMethod · 0.36