1.4 KiB
1.4 KiB
title | id | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
Date format | 59669d08d75b60482359409f | 5 | Formato de data |
Description
Retornar uma matriz com a data atual nos formatos:
- 2007-11-23 e
- domingo, 23 de novembro de 2007
Exemplo de saída: ['2007-11-23', 'Sunday, November 23, 2007']
Instructions
Tests
tests:
- text: <code>getDateFormats</code> é uma função.
testString: 'assert(typeof getDateFormats === "function", "<code>getDateFormats</code> is a function.");'
- text: Deve retornar um objeto.
testString: 'assert(typeof getDateFormats() === "object", "Should return an object.");'
- text: Devolveu um array com 2 elementos.
testString: 'assert(getDateFormats().length === 2, "Should returned an array with 2 elements.");'
- text: Deve devolver a data correta no formato correto
testString: 'assert.deepEqual(getDateFormats(), dates, equalsMessage);'
Challenge Seed
function getDateFormats () {
// Good luck!
return true;
}
After Test
console.info('after the test');
Solution
// solution required