Set the content to an attribute, and change the attribute with script.
#some-id:after { content: attr(data-something); }
document.getElementById('some-id').dataset.something = new Date();
Set the content to an attribute, and change the attribute with script.
#some-id:after { content: attr(data-something); }
document.getElementById('some-id').dataset.something = new Date();