I am trying to display a number for years of service on a website. Essentially I thought I could put in a start date and current date to have an output of the years in between.
I can gt the current year using the following code but am unsure how to calculate the deference
<script>document.write(2010)+(/\d{4}/.exec(Date())[0])</script>
Aucun commentaire:
Enregistrer un commentaire