Answer the question
In order to leave comments, you need to log in
How to properly format time in vue-moment?
I understand vue and vue-moment.
Installed moment-duration-format
I'm trying to convert seconds to hours: minutes: seconds. The number of seconds is converted to this format if the number of seconds is greater than 3599, otherwise it is formatted as minutes:seconds.
How to format correctly?
<tr>
<td>{{item.date}}</td>
<td>{{item.id}}</td>
<td>{{item.name}}</td>
<td>{{item.phone}}</td>
<td>{{item.address}}</td>
<td>{{item.status}}</td>
<td>{{[-item.last_edited, "seconds"] | duration("humanize", true)}}</td>
<td>{{ [item.open, "seconds"] | duration(item.open, "hh:mm:ss").format() }}</td>
</tr>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question