Q:

calculate minutes left between hours actionscript 3

I'm using AS3 to pull XML data, one field is a time field in the XML and displays an hour.  I'm getting the date and then the AS3 loads the proper node based on teh time set in the XML.  This is all working perfect - I have two times as variables, one is the system time (which is set in UTC time) the other is one hour ahead.  
The two variables are currentHour and newHour - it's doing everything I want however I'd like to now create a countdown between these two hours and display time remaining in the minutes. 
Here is the complete code for that.  
Get the time from XML using AS3
These seems straight forward but I'm having a hard time.  I've tried this:
var data:Array = [currentHour, newHour];

var aDate:String = data[0].split(" ")[0];

var dateElements:Array = aDate.split("-");
var date1:Date = new Date();
date1.setMinutes(int(data[0].split(" ")[1].split(":")[0]));
dateElements = data[1].split(" ")[0].split("-");
var date2:Date = new Date();
date2.setMinutes(int(data[1].split(" ")[1]));
var elapse:Number = date2.getTime() - date1.getTime();
trace("minutes: " + date2.getMinutes());

But that isn't right, so I tried this: 
if(currentHour < newHour)
{
var dayDiff:Number = newHour-currentHour;
// make sure it’s in the future
if (dayDiff > 0)
{
var seconds:Number = dayDiff / 1000;
var minutes:Number = seconds / 60;
}
trace(minutes, seconds);
}

If someone could help me get unstuck that would be amazing.  Thank you!  

A:

Created a new answer which didn't contain the spam from previous one where I tried to figure out what the actual issue was and what the expectations of the program was.  Anyways to summarize:
User wanted to, given a specific date/time, find out how long until the next complete hour, so for instance given the time 4:47pm wanted to find out how many minutes and seconds left until 5:00pm. 
import flash.display. MovieClip;
import flash.events. Event;
import flash.events. TimerEvent;
import flash.globalization. NumberFormatter;
import flash.utils.getTimer;
import flash.utils. Timer;

var timer:Timer = new Timer(250);
var my_date:Date = new Date();
var targetDate:Date = new Date();

//calculate how many total milliseconds left until next whole hour since that is how as3 is using Date-objects
var timeUntilWholeHourMS:Number = (60 - my_date.getMinutes()) * 60 * 1000;
targetDate.setTime(my_date.getTime() + timeUntilWholeHourMS);
//clear the "second and milliseconds" part of the new time since we want the whole hours
targetDate.setSeconds(0, 0);

var secondsLeft:Number = (targetDate.time - new Date().time) / 1000;
//make sure it is in the future
if (secondsLeft > 0) {
    timer.addEventListener(TimerEvent. TIMER, onTimer);
    timer.start();
}

function onTimer(e:flash.events. TimerEvent):void {
    secondsLeft = (targetDate.time - new Date().time)/1000;

    if (secondsLeft > 0) {
        var minutes:Number = Math.floor(secondsLeft/60);
        var seconds:Number = Math.floor(secondsLeft%60);
        trace("minutes left: " + minutes, ", seconds left: " + seconds);
    } else {
        //time limit reached
        timer.removeEventListener(TimerEvent. TIMER, onTimer);
        timer.stop();
        trace("Time limit reached!"); 
    }
}

