Skip to content

Instantly share code, notes, and snippets.

View ezani92's full-sized avatar

Mohamad Shaiful Ezani ezani92

  • Naxpansion Sdn Bhd
View GitHub Profile
@crynobone
crynobone / Birthdate Parser.js
Created March 10, 2011 21:24
Malaysia Indentification Card Number to Birthdate
var ic = '090303086521';
if(ic.match(/^(\d{2})(\d{2})(\d{2})-?\d{2}-?\d{4}$/)) {
var year = RegExp.$1;
var month = RegExp.$2;
var day = RegExp.$3;
console.log(year, month, day);
var now = new Date().getFullYear().toString();