Forum Discussion
Convert systemDate to static txt
OK, do I need to per define certificateDate a Variable first, then add the new script to the JavaScritp link?
var dateString = localStorage.getItem('certificateDate');
if (!dateString) {
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
dateString = month + "/" + day + "/" + year;
localStorage.setItem('certificateDate', dateString);
}
var player = GetPlayer();
player.SetVar("systemDate", dateString);
Thanks, Tina
...'certificateDate' could be anything, no need to declare. Just make sure it's consistent through out the code. It's used twice in this code.
- TinaDenmark-5588 months agoCommunity Member
I’m sorry for the many replies. I don’t know Java and don’t quite understand syntax. I need the hooked on phonics version of what to do.
So, then I need to place certificateDate on my certificate for the date to remain static?
Thanks, Tina