]>
git.r.bdr.sh - rbdr/dasein/blob - app/filters/usertime.js
de678949b1dfdeabccba4f69fce2b87d05c5d3e5
5 export default internals
.UsertimeFilter
= Vue
.filter('usertime', (timestamp
) => {
7 const date
= new Date(parseInt(timestamp
));
9 const dateString
= date
.toISOString();
11 const dateComponents
= dateString
.split('T');
12 const dateFragment
= dateComponents
[0];
13 const timeComponents
= dateComponents
[1].split(':');
15 const hourFragment
= timeComponents
[0];
16 const minuteFragment
= timeComponents
[1];
18 return `${dateFragment} ${hourFragment}:${minuteFragment}`;