Hi, I have this button for example, and I would like to take over in a variable after data-content = "23-10-2020" for example and hide if one if two dates are of the same type
How you accomplish this depends on if you want to compare the two strings to see if they're the same, or parse them into dates and see if they're the same. For example, if you're comparing strings, you could have "23-10-2020" (european format) and "10-23-2020" (american format) which are technically the same date, but unless you parse them as dates they won't be seen as equal, so keep that in mind.
A very basic example for you
let divs = document.getElementsByClassName('btn btn-default color_green');
let seen_dates = array();
divs.forEach(function(div))
if (seen_dates.includes(div.dataset.content)) {
div.style.display = 'none';
} else {
div.style.display = 'inline';
}
// Save any dates we have seen to compare. If we see the same date again, hide that div.
seen_dates[] = div.dataset.content;
}