Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/date-format.chinese.md
2020-08-16 04:45:18 +05:30

1.3 KiB

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

Description

任务:

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

- 2007-11-23和

- 2007年11月23日星期日

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

Instructions

Tests

tests:
  - text: <code>getDateFormats</code>是一个函数。
    testString: assert(typeof getDateFormats === 'function');
  - text: 应该返回一个对象。
    testString: assert(typeof getDateFormats() === 'object');
  - text: 应该返回一个包含2个元素的数组。
    testString: assert(getDateFormats().length === 2);
  - text: 应以正​​确的格式返回正确的日期
    testString: assert.deepEqual(getDateFormats(), dates, equalsMessage);

Challenge Seed

function getDateFormats () {
  // Good luck!
  return true;
}

After Test

console.info('after the test');

Solution

// solution required