en.javascript.info/1-js/4-data-structures/11-datetime/8-format-date-ddmmyy/task.md
2015-01-11 01:54:57 +03:00

14 lines
No EOL
521 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Вывести дату в формате дд.мм.гг
[importance 3]
Напишите функцию `formatDate(date)`, которая выводит дату `date` в формате `дд.мм.гг`:
Например:
```js
var d = new Date(2014, 0, 30); // 30 января 2014
alert( formatDate(d) ); // '30.01.14'
```
P.S. Обратите внимание, ведущие нули должны присутствовать, то есть 1 января 2001 должно быть 01.01.01, а не 1.1.1.