Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/date-format.md

709 B

id, title, challengeType, videoUrl
id title challengeType videoUrl
59669d08d75b60482359409f 日期格式 5

--description--

任务:

返回包含以下格式的当前日期的数组:

- 2007-11-23和

- 2007年11月23日星期日

示例输出: ['2007-11-23', 'Sunday, November 23, 2007']

--hints--

getDateFormats是一个函数。

assert(typeof getDateFormats === 'function');

应该返回一个对象。

assert(typeof getDateFormats() === 'object');

应该返回一个包含2个元素的数组。

assert(getDateFormats().length === 2);

应以正​​确的格式返回正确的日期

assert.deepEqual(getDateFormats(), dates, equalsMessage);

--solutions--