Repository URL to install this package:
|
Version:
3.12.2 ▾
|
/**
* Function to extract time from time stamp and convert into string as hh:mm e.g. 15:55
* @param {Number} timeStamp - sets the new date by adding the provided number of days for the current date
* @returns {String} - time in format HH:mm
*/
export default (function (timeStamp) {
return new Date(timeStamp).toLocaleTimeString().replace(/(.*)\D\d+/, '$1');
});