'Call time.strftime for years before 1900 by rolling
forward a multiple of 28 years.
*fmt* is a :func:`strftime` format string.
Dalke: I hope I did this math right.  Every 28 years the
calendar repeats, except through century leap years excepting
the 400 year leap years.  But only if you\'re using the Gregorian
calendar.'

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

    if (fmt is None):
        fmt = self.fmt
    fmt = re.sub(u'((^|[^%])(%%)*)%f', u'\\g<1>{0:06d}'.format(dt.microsecond), fmt)
    year = dt.year
    delta = (2000 - year)
    off = (6 * ((delta // 100) + (delta // 400)))
    year = (year + off)
    year1 = (year + (((2000 - year) // 28) * 28))
    year2 = (year1 + 28)
    timetuple = dt.timetuple()
    s1 = time.strftime(fmt, ((year1,) + timetuple[1:]))
    s2 = time.strftime(fmt, ((year2,) + timetuple[1:]))
    (s1, s2) = self._replace_common_substr(s1, s2, u'{0:04d}'.format(year1), u'{0:04d}'.format(year2), u'{0:04d}'.format(dt.year))
    (s1, s2) = self._replace_common_substr(s1, s2, u'{0:02d}'.format((year1 % 100)), u'{0:02d}'.format((year2 % 100)), u'{0:02d}'.format((dt.year % 100)))
    return cbook.unicode_safe(s1)
