File tree Expand file tree Collapse file tree
hwproj.front/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,11 @@ export default class Utils {
2727
2828 if ( diffHoursInt === 0 ) {
2929 const diffMinutes = Math . trunc ( milliseconds / ( 1000 * 60 ) )
30- return diffMinutes + " " + this . pluralizeHelper ( [ "минуту" , "минуты" , "минут" ] , diffMinutes )
30+ if ( diffMinutes > 0 ) {
31+ return diffMinutes + " " + this . pluralizeHelper ( [ "минуту" , "минуты" , "минут" ] , diffMinutes )
32+ }
33+ const diffSeconds = Math . trunc ( milliseconds / 1000 )
34+ return diffSeconds + " " + this . pluralizeHelper ( [ "секунду" , "секунды" , "секунд" ] , diffSeconds )
3135 }
3236
3337 const diffDays = Math . trunc ( diffHours / 24 )
@@ -70,7 +74,7 @@ export default class Utils {
7074 month : 'long' ,
7175 day : 'numeric' ,
7276 } ;
73-
77+
7478 return ( new Date ( date ) ) . toLocaleString ( undefined , options )
7579 }
7680
You can’t perform that action at this time.
0 commit comments