Um - Javascript, not Java. Javascript, not Java. Javascript, not Java.... right.
somewhere in the javascript code there would be something that sez something like "new Date()" - which is where the current date is found. When you've found that you're halfway there.
In PHP, get your date from the database however it's stored, then get it into a form that Javascript's Date() constructor can use:
- a Unix timestamp (seconds since 1970-1-1)
- a string like "Jan 1, 1970")
- three numbers: year, month, and day.
Echo these bits inside the "()" of the Date constructor; respectively:
Date(<?php echo $timestamp?>)
or
Date("<?php echo $string?>")
or
Date(<?php echo "$year,$month,$day"?>)
Whew, and all without having to do any Javascript coding...Or Java.