VIDEO: Arithmetic Operations with Date and Time on ActionScript

Tue, Jan 5, 2010

ActionScript

VIDEO: Arithmetic Operations with Date and Time on ActionScript





How to add minutes hours, even days on a date using the get time and set time methods.


Here is the Adobe Reference.

HERE IS THE SOURCE CODE!

//The Add Hour and Day on ActionScript 30
// Avraham Saltoun
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE

var myDate:Date = new Date();
// by default new dates recieve
// system date and time

//Arithimetic operations are done
// in milliseconds. Let’s create a few
// variables to handle that…

var minutesMilliseconds:uint = 1000 * 60;
var hoursMilliseconds:uint = 60 * minutesMilliseconds;
var daysMilliseconds:uint = 24 * hoursMilliseconds;

//let’s add a day

myDate.setTime(myDate.getTime()+ daysMilliseconds);

trace (myDate);

// Thanks for watching!

Related Articles:

, , , , , , , , , , , , , , , , ,

2 Responses to “VIDEO: Arithmetic Operations with Date and Time on ActionScript”


Trackbacks/Pingbacks

  1. [...] more here: VIDEO: Arithmetic Operations with Date and Time on ActionScript … Tags: action, author, blessings, date-using, even-days, svadhyaya, time-on-actionscript, [...]

  2. [...] operations VIDEO: Arithmetic Operations with Date and Time on …One Response to VIDEO: Arithmetic Operations with Date and Time on ActionScript … more here: [...]

Leave a Reply

Security Code:

AVA Trading Forex
WIX create a FREE website.
Try ACT! 2010 Today
Accept Credit Cards
UseNeXT Fast Downloads
For Free Stuff Click Here

Get Paid for Filling Surveys


Go Daddy $7.49.com sale 125x125 Huddle Collaboration
oDesk Certified Action Script Programmer oDesk Certified Adobe Flash CS3 Designer oDesk Certified Adobe Photoshop 6.0 Designer

Compare Web Hosting Services and Prices

web hosting - Web Hosting guide to popular hosts.

Twitter Followers