Answer the question
In order to leave comments, you need to log in
Google tag manager error?
In google tag manager when inserting javascript code following their example
function()
{
var dSelector = '[name=your-sex]';
var dOptions = document.querySelectorAll(dSelector+' option');
for(var i = 0; i < dOptions.length; i++)
if(dOptions[i].selected)
return dOptions[i].innerHTML;
}
Answer the question
In order to leave comments, you need to log in
const dataParse = (string) => {
let options = {
day: '2-digit',
month: 'short',
year: 'numeric',
weekday: 'short',
timezone: 'UTC'
}
let data = new Date(string).toLocaleString("ru", options).split(",")
return `${data[1]},${data[0]}`
}
console.log(dataParse('12.05.18'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question