Can Military Time be reset to Regular time in Flash File?


i working on site has clock displays in military time, there way change regular time.

following action script:

months_array = ["january", "february", "march", "april", "may", "june", "july", "august", "septempber", "oktober", "november", "december"];
days_array = ["mon", "tue", "wed", "thur", "fri", "sat", "sun"];
date = new date();
var dayofweek_array = new array("sun", "mon", "tue", "wed", "thur", "fri", "sat");
var today_date = new date();
var day_str = dayofweek_array[today_date.getday()];
f_clock = function ()
{
var _loc1 = new date();
var _loc4;
var _loc3;
var _loc2;
if (_loc1.getseconds() < 10)
{
_loc4 = "0" + _loc1.getseconds();
}
else
{
_loc4 = _loc1.getseconds();
} // end else if
if (_loc1.getminutes() < 10)
{
_loc3 = "0" + _loc1.getminutes();
}
else
{
_loc3 = _loc1.getminutes();
} // end else if
if (_loc1.gethours() < 10)
{
_loc2 = "0" + _loc1.gethours();
}
else
{
_loc2 = _loc1.gethours();
} // end else if
if (_loc1.gethours() < 12)
{
_loc2 = _loc1.gethours();
}
else
{
_loc2 = _loc1.gethours() - 12;
} // end else if
if (hours >= 12)
{
hours = hours - 12;
ampm = "pm";
}
else
{
ampm = "am";
} // end else if
if (hours == 0)
{
hours = 12;
} // end if
time_txt.text = _loc2 + "." + _loc3 + " " + ampm + ", " + date.getdate() + " " + dayofweek_array[_loc1.getday()] + " " + months_array[date.getmonth()] + " " + date.getfullyear();
};
f_clock();
setinterval(f_clock, 1000);

from can see, code show displaying non-military time.  there specific problem it?

.



More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support