I need to display two times. Current time, and 6 minutes later.


my pdf form has 2 text fields. when click button, want 2 fields populated 2 times. first shows current time, , second 1 shows current time plus 6 minutes. brand new javascript, have managed current time work, cannot life of me figure out how show time 6 minutes later current time. feel simple, can't seem work. java script show time 6 minutes in future?

 

thanks.

one gets current date , time with:

 

new date();

 

and can format util.printd() method

 

var onow = new date(); // system date time object;

var snow = util.printd("h:mm:sstt", onow); // format current time;

app.alert("it " + snow, 3, 0); // display current time;

 

there several way modify the date object

date arithmetic or using getminutes , set minutes methods.

 

var onow = new date(); // system date time object;

var snow = util.printd("h:mm:sstt", onow); // format current time;

app.alert("it " + snow, 3, 0); // display current time;

var onext = onow; //  create new date object;

onext.setminutes(onext.getminutes() + 6); // add 6 minutes;

var snext = util.printd("h:mm:sstt", onext); // format future time;

app.alert("in 6 minutes time wll " + snext, 3, 0); // display future time;



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

Thread: Can not create raid array: mdadm: no raid-devices specified.

Thread: HOW TO: Package and theme GTK+ / Gtkmm apps in Linux for Windows

Thread: Twinview issues