let format ~fmt date =
  let buf = Buffer.create (String.length fmt * 2) in
  format_to buf ~fmt date; 
  Buffer.contents buf