Skip to content

Instantly share code, notes, and snippets.

View ChristianRich's full-sized avatar

Christian Rich ChristianRich

View GitHub Profile
@ChristianRich
ChristianRich / ES5-ES6-ES2017-ES2019 omit & pick
Created December 30, 2022 14:17 — forked from bisubus/ES5-ES6-ES2017-ES2019 omit & pick
ES5/ES6/ES2017/ES2019 omit & pick
@ChristianRich
ChristianRich / regex-yyyy-mm-dd.js
Created July 5, 2017 07:30 — forked from m-coding/regex-yyyy-mm-dd.js
javascript regex to match date pattern YYYY-MM-DD
// allows YYYY/M/D and periods instead of slashes
// http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd
/^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/
// YYYY-MM-DD and YYYY-M-D
// http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript
/^\d{4}\-\d{1,2}\-\d{1,2}$/
// YYYY-MM-DD
// https://gist.github.com/arth2o/8471150