freeCodeCamp/curriculum/challenges/spanish/08-coding-interview-prep/rosetta-code/date-format.spanish.md

68 lines
1.4 KiB
Markdown
Raw Normal View History

2018-10-08 17:34:43 +00:00
---
title: Date format
id: 59669d08d75b60482359409f
challengeType: 5
2018-10-10 20:20:40 +00:00
videoUrl: ''
localeTitle: Formato de fecha
2018-10-08 17:34:43 +00:00
---
## Description
2018-10-10 20:20:40 +00:00
<section id="description"> Tarea: <p> Devuelve una matriz con la fecha actual en los formatos: </p><p> - 2007-11-23 y </p><p> - Domingo 23 de noviembre de 2007. </p><p> Salida de ejemplo: <code>[&#39;2007-11-23&#39;, &#39;Sunday, November 23, 2007&#39;]</code> </p></section>
2018-10-08 17:34:43 +00:00
## Instructions
2018-10-10 20:20:40 +00:00
<section id="instructions">
2018-10-08 17:34:43 +00:00
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>getDateFormats</code> es una función.
testString: 'assert(typeof getDateFormats === "function", "<code>getDateFormats</code> is a function.");'
- text: Debe devolver un objeto.
testString: 'assert(typeof getDateFormats() === "object", "Should return an object.");'
- text: Debe devolverse una matriz con 2 elementos.
testString: 'assert(getDateFormats().length === 2, "Should returned an array with 2 elements.");'
- text: Debe devolver la fecha correcta en el formato correcto.
testString: 'assert.deepEqual(getDateFormats(), dates, equalsMessage);'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function getDateFormats () {
// Good luck!
return true;
}
2018-10-10 20:20:40 +00:00
2018-10-08 17:34:43 +00:00
```
</div>
### After Test
<div id='js-teardown'>
```js
console.info('after the test');
```
</div>
</section>
## Solution
<section id='solution'>
```js
2018-10-10 20:20:40 +00:00
// solution required
2018-10-08 17:34:43 +00:00
```
</section>