Skip to content

Instantly share code, notes, and snippets.

@crongro
Last active May 24, 2018 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crongro/2fdf5161a4b30eab9b4e16748762a88e to your computer and use it in GitHub Desktop.
Save crongro/2fdf5161a4b30eab9b4e16748762a88e to your computer and use it in GitHub Desktop.
regtest
//아래처럼 출력되는 getDate함수를 만드세요.
//정규표현식을 사용합니다.
console.log(getDate("2019-11-2"));
//=> Mon Dec 02 2019 00:00:00 GMT+0900 (KST)
console.log(getDate("2017-3-1"));
console.log(getDate("2014-3-12"));
console.log(getDate("2014-3-"));//error
console.log(getDate("2014-3-32"));//error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment