2023-01-30 02:38:45 +01:00
|
|
|
|
import html from '../utils/html.js'
|
|
|
|
|
import Date from './date.js'
|
|
|
|
|
|
2023-09-28 02:50:43 +02:00
|
|
|
|
/**
|
|
|
|
|
* @param {string} startDate
|
|
|
|
|
* @param {string} [endDate]
|
|
|
|
|
* @returns {string}
|
|
|
|
|
*/
|
2023-01-30 02:38:45 +01:00
|
|
|
|
export default function Duration(startDate, endDate) {
|
|
|
|
|
return html`${Date(startDate)} – ${endDate ? Date(endDate) : 'Present'}`
|
|
|
|
|
}
|