json-theme-even-fork/components/duration.js

12 lines
287 B
JavaScript
Raw Permalink Normal View History

import html from '../utils/html.js'
import Date from './date.js'
/**
* @param {string} startDate
* @param {string} [endDate]
* @returns {string}
*/
export default function Duration(startDate, endDate) {
return html`${Date(startDate)} ${endDate ? Date(endDate) : 'Present'}`
}