mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
/**
|
|
* Date time in LocaleString
|
|
* @param {string} input
|
|
* @returns {string}
|
|
*/
|
|
export default function datetime(input) {
|
|
const date = new Date(input);
|
|
return date.toLocaleString('en-GB', {
|
|
month: 'short',
|
|
day: 'numeric',
|
|
year: 'numeric',
|
|
hour: 'numeric',
|
|
minute: 'numeric',
|
|
hour12: true,
|
|
timeZone: 'Europe/London'
|
|
});
|
|
}
|