Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

split date using javascript

var date = "28st December,2016";

var date_split1 = date.split(' ');
var date_split2 = date_split1[1].split(',');

console.log('date: ', date_split1[0]);
console.log('month: ', date_split2[0]);
console.log('year: ', date_split2[1]);
Comment

PREVIOUS NEXT
Code Example
Javascript :: find element with data attribute jquery 
Javascript :: javascript get distinct values from array 
Javascript :: iconify/react - npm 
Javascript :: best javascript ide 
Javascript :: angular create guard 
Javascript :: get youtube id from url javascript 
Javascript :: angular generate module with rooting 
Javascript :: You need to authorize this machine using `npm adduser` 
Javascript :: bottom tab navigator react native transparent 
Javascript :: flattenDeep in es 6 without lodash 
Javascript :: javascript check if string is number 
Javascript :: window.onload in javascript 
Javascript :: encrypt data using SHA256 algorithm in JavaScript 
Javascript :: react router next page top 
Javascript :: react native disable the text input 
Javascript :: js check window active 
Javascript :: pdf table files download react not working 
Javascript :: jquery check if type is checkbox 
Javascript :: call function on modal open 
Javascript :: vue js required props 
Javascript :: destructuring dynamic properties 
Javascript :: get result and write to file node 
Javascript :: nodejs json beautify 
Javascript :: history.push 
Javascript :: remove border textinput react native 
Javascript :: proactive vs reactive 
Javascript :: nodejs request api 
Javascript :: get dirname to last directory node 
Javascript :: getusermedia example 
Javascript :: dart list files in directory 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =