I am trying to convert a firebase timestamp to month abbreviation day, year format with the time in parentheses (e.g., 11/4/2021 (time)).
I have the firebase timestamp and I thought I would be able to use a computed function, but I get the vetur warning "This expression is not callable. Type 'String' has no call signatures."
I have only gotten to trying to get the month, date, and year.
<template>
<div>{{ convertDate(timestamp) }}
</template>
<script>
export default {
computed: {
convertDate(time) {
let month = time.getUTCMonth() + 1;
let day = time.getUTCDate();
let year = time.getUTCFullYear();
return month + " " + day + "," + year;
},
},
};