Skip to content

Commit 1a45126

Browse files
Update solution.md
Условие для вывода "прямо сейчас" - меньше 1 секунды (1000 мс)
1 parent c5fa0e7 commit 1a45126

File tree

1 file changed

+1
-1
lines changed
  • 1-js/05-data-types/11-date/8-format-date-relative

1 file changed

+1
-1
lines changed

1-js/05-data-types/11-date/8-format-date-relative/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
function formatDate(date) {
55
let diff = new Date() - date; // разница в миллисекундах
66

7-
if (diff < 1000) { // меньше 1 минуты
7+
if (diff < 1000) { // меньше 1 секунды
88
return 'прямо сейчас';
99
}
1010

0 commit comments

Comments
 (0)