UNPKG

@davidosborn/crypto-tax-calculator

Version:

A tool to calculate the capital gains of cryptocurrency assets for Canadian taxes

26 lines (23 loc) 560 B
'use strict'; /** * Formats a date/time for displaying to the user. * @param {number} time The date/time, as a UNIX timestamp. * @returns {string} The formatted date/time. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function formatTime(time) { return new Date(time).toLocaleString(undefined, { day: '2-digit', hour: '2-digit', hour12: true, minute: '2-digit', month: 'short', second: '2-digit', year: 'numeric' }); } var _default = formatTime; exports.default = _default;