 _array = (t) ->
   return tz(t, "%Y %m %d %H %M %S").split(/\s+/).map( (e) -> return parseInt(e, 10) );
 
+_strftime = (t, format) ->
+  if _.isFunction(format)
+    return format(t)
+  else
+    return tz(t, format)
+
 class DatetimeFormatter
 
   # Labels of time units, from finest to coarsest.

      'hours':        ['%Hh', '%H:%M']
      'days':         ['%m/%d', '%a%d']
      'months':       ['%m/%Y', '%b%y']
      'years':        ['%Y'] #[_two_digit_year, _four_digit_year]
    }
    @formats = {}
    for fmt_name of @_formats
      fmt_strings = @_formats[fmt_name]
      sizes = []
      tmptime = tz(new Date())
      for s in fmt_strings
          size = (tz(tmptime, s)).length
          sizes.push(size)
      @formats[fmt_name] = [sizes, fmt_strings]
    return

    # This table of format is convert into the 'formats' dict.  Each tuple of
    # formats must be ordered from shortest to longest.
    @_formats = {
      'microseconds': [_us, _ms_dot_us]
      'milliseconds': ['%3Nms', '%S.%3Ns']
      'seconds':      [':%S', '%Ss']
      'minsec':       ['%M:%S']
