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

68 lines
4.1 KiB
Markdown
Raw Normal View History

2018-10-08 13:34:43 -04:00
---
title: Discordian date
id: 59f4eafba0343628bb682785
challengeType: 5
2018-10-10 16:20:40 -04:00
videoUrl: ''
localeTitle: Fecha discordiana
2018-10-08 13:34:43 -04:00
---
## Description
2018-10-10 16:20:40 -04:00
<section id="description"> Tarea: <p> Convierte una fecha dada del <a href="https://en.wikipedia.org/wiki/Gregorian calendar" title="wp: calendario gregoriano">calendario gregoriano al calendario</a> <a href="https://en.wikipedia.org/wiki/Discordian calendar" title="wp: calendario discordiano">Discordiano</a> . </p></section>
2018-10-08 13:34:43 -04:00
## Instructions
2018-10-10 16:20:40 -04:00
<section id="instructions">
2018-10-08 13:34:43 -04:00
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>discordianDate</code> es una función.
testString: 'assert(typeof discordianDate === "function", "<code>discordianDate</code> is a function.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2010, 6, 22))</code> debe devolver <code>&quot;Pungenday, the 57th day of Confusion in the YOLD 3176&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2010, 6, 22)) === "Pungenday, the 57th day of Confusion in the YOLD 3176", "<code>discordianDate(new Date(2010, 6, 22))</code> should return <code>"Pungenday, the 57th day of Confusion in the YOLD 3176"</code>.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2012, 1, 28))</code> debe devolver <code>&quot;Prickle-Prickle, the 59th day of Chaos in the YOLD 3178&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2012, 1, 28)) === "Prickle-Prickle, the 59th day of Chaos in the YOLD 3178", "<code>discordianDate(new Date(2012, 1, 28))</code> should return <code>"Prickle-Prickle, the 59th day of Chaos in the YOLD 3178"</code>.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2012, 1, 29))</code> debe devolver <code>&quot;Setting Orange, the 60th day of Chaos in the YOLD 3178. Celebrate St. Tib\&quot;s Day!&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2012, 1, 29)) === "Setting Orange, the 60th day of Chaos in the YOLD 3178. Celebrate St. Tib\"s Day!", "<code>discordianDate(new Date(2012, 1, 29))</code> should return <code>"Setting Orange, the 60th day of Chaos in the YOLD 3178. Celebrate St. Tib\"s Day!"</code>.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2012, 2, 1))</code> debe devolver <code>&quot;Setting Orange, the 60th day of Chaos in the YOLD 3178&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2012, 2, 1)) === "Setting Orange, the 60th day of Chaos in the YOLD 3178", "<code>discordianDate(new Date(2012, 2, 1))</code> should return <code>"Setting Orange, the 60th day of Chaos in the YOLD 3178"</code>.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2010, 0, 5))</code> debe devolver <code>&quot;Setting Orange, the 5th day of Chaos in the YOLD 3176. Celebrate Mungday!&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2010, 0, 5)) === "Setting Orange, the 5th day of Chaos in the YOLD 3176. Celebrate Mungday!", "<code>discordianDate(new Date(2010, 0, 5))</code> should return <code>"Setting Orange, the 5th day of Chaos in the YOLD 3176. Celebrate Mungday!"</code>.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2011, 4, 3))</code> debe devolver <code>&quot;Pungenday, the 50th day of Discord in the YOLD 3177. Celebrate Discoflux!&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2011, 4, 3)) === "Pungenday, the 50th day of Discord in the YOLD 3177. Celebrate Discoflux!", "<code>discordianDate(new Date(2011, 4, 3))</code> should return <code>"Pungenday, the 50th day of Discord in the YOLD 3177. Celebrate Discoflux!"</code>.");'
2018-10-10 16:20:40 -04:00
- text: '<code>discordianDate(new Date(2015, 9, 19))</code> debe devolver <code>&quot;Boomtime, the 73rd day of Bureaucracy in the YOLD 3181&quot;</code> .'
2018-10-08 13:34:43 -04:00
testString: 'assert(discordianDate(new Date(2015, 9, 19)) === "Boomtime, the 73rd day of Bureaucracy in the YOLD 3181", "<code>discordianDate(new Date(2015, 9, 19))</code> should return <code>"Boomtime, the 73rd day of Bureaucracy in the YOLD 3181"</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function discordianDate (date) {
// Good luck!
return true;
}
2018-10-10 16:20:40 -04:00
2018-10-08 13:34:43 -04:00
```
</div>
</section>
## Solution
<section id='solution'>
```js
2018-10-10 16:20:40 -04:00
// solution required
2018-10-08 13:34:43 -04:00
```
</section>