def _strftime1900(d, format):
 if (d.year < 1900):
  return strftime(format, ((1900,) + d.timetuple()[1:])).replace('1900', str(d.year), 1)
 return datetime.strftime(d, format)

def _strftime1900 ( d , format ) : if ( d . year < 1900 ) : return strftime ( format , ( ( 1900 , ) + d . timetuple ( ) [ 1 : ] ) ) . replace ( '1900' , str ( d . year ) , 1 ) return datetime . strftime ( d , format )
returns the given date formatted as a string .