{"size": 367, "ext": "js", "max_stars_repo_path": "lib/format.js", "max_stars_repo_name": "prantlf/build-number-generator", "max_stars_repo_stars_event_min_datetime": "2018-07-07T15:57:18.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-04T08:54:07.000Z", "max_issues_repo_path": "lib/format.js", "max_issues_repo_name": "prantlf/build-number-generator", "max_issues_repo_issues_event_min_datetime": "2018-09-08T13:36:15.000Z", "max_issues_repo_issues_event_max_datetime": "2020-12-01T09:08:52.000Z", "max_forks_repo_path": "lib/format.js", "max_forks_repo_name": "prantlf/build-number-generator", "max_forks_repo_forks_event_min_datetime": "2019-05-19T15:36:11.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-14T15:17:50.000Z"}
{"max_stars_count": 19, "max_issues_count": 2, "max_forks_count": 2, "avg_line_length": 24.4666666667, "max_line_length": 54, "alphanum_fraction": 0.6866485014}
import parseBuildTime from './parse'
import { pad2 } from './pad'

function formatBuildTime (date) {
  if (typeof date === 'string') {
    date = parseBuildTime(date)
  }
  const datePart = date.toDateString()
  const hours = date.getHours()
  const minutes = date.getMinutes()
  return `${datePart} ${pad2(hours)}:${pad2(minutes)}`
}

export default formatBuildTime
