'Formats the date using strftime()
:param format:
The strftime() format string
:return:
The formatted date as a unicode string in Python 3 and a byte
string in Python 2'

def strftime(self, format):

    output = self._format(format)
    if py2:
        return output.encode(u'utf-8')
    return output
