Answer the question
In order to leave comments, you need to log in
How to correctly display the time according to the template that came from the server?
The time from the server comes in the following format: "2 3:4:0.0"
Where, 2 - days, 3 - hours, 4 - minute. You can get rid of 0.
There is a place where you can select the time, after selecting the values are substituted and displayed normally (for example, 2d. 3h. 4m.)
This thing does it:
{{ timeDays ? `${timeDays}д.` : '' }} {{ timeHours ? `${timeHours}ч.` : '' }} {{ timeMinutes ? `${timeMinutes}м.` : '' }}
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