'Refer to documentation for datetime.strftime.
*fmt* is a :func:`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. For years before 100, %y and %Y will yield
zero-padded strings.'

def strftime(self, dt, fmt=None):

    if (fmt is None):
        fmt = self.fmt
    fmt = self.illegal_s.sub(u'\\1', fmt)
    fmt = fmt.replace(u'%s', u's')
    if (dt.year >= 1900):
        return cbook.unicode_safe(dt.strftime(fmt))
    return self.strftime_pre_1900(dt, fmt)
