src/datetime.js
function tsToObj(ts, offset) {
  ts += offset * 60 * 1000;

  const d = new Date(ts);

  return {
    year: d.getUTCFullYear(),
    month: d.getUTCMonth() + 1,
    day: d.getUTCDate(),
    hour: d.getUTCHours(),
    minute: d.getUTCMinutes(),
    second: d.getUTCSeconds(),
    millisecond: d.getUTCMilliseconds()
  };
}
function tsToObj(ts, offset) {
  ts += offset * 60 * 1000;

  const d = new Date(ts);

  return {
    year: d.getUTCFullYear(),
    month: d.getUTCMonth() + 1,
    day: d.getUTCDate(),
    hour: d.getUTCHours(),
    minute: d.getUTCMinutes(),
    second: d.getUTCSeconds(),
    millisecond: d.getUTCMilliseconds()
  };
}
function tsToObj ( ts , offset ) { ts += offset * 60 * 1000 ; const d = new Date ( ts ) ; return { year : d . getUTCFullYear ( ) , month : d . getUTCMonth ( ) + 1 , day : d . getUTCDate ( ) , hour : d . getUTCHours ( ) , minute : d . getUTCMinutes ( ) , second : d . getUTCSeconds ( ) , millisecond : d . getUTCMilliseconds ( ) } ; }
convert an epoch timestamp into a calendar object with the given offset
convert an epoch timestamp into a calendar object with the given offset