package com.glezo.timeFormatter;

public class TimeFormatter 
{
	public static String	format(long milliseconds)
	{
		long days	=milliseconds/1000/60/60/24;
		milliseconds-=days*1000*60*60*24;
		long hours	=milliseconds/1000/60/60;
		milliseconds-=hours*1000*60*60;
		long minutes=milliseconds/1000/60;
		milliseconds-=minutes*1000*60;
		long seconds=milliseconds/1000;
		milliseconds-=seconds*1000;
		String r="";
		if(days!=0)			{	r+=days+" days, "+String.format("%02d",hours)+":"+String.format("%02d",minutes)+":"+String.format("%02d",seconds)+"."+String.format("%03d",milliseconds);	}
		else 				{	r+=String.format("%02d",hours)+":"+String.format("%02d",minutes)+":"+String.format("%02d",seconds)+"."+String.format("%03d",milliseconds);					}
		return r;
	}
}

@@ -57,16 +57,181 @@
 tter %0A%7B%0A
+%09//TODO! so raggedy, should use exteral iso pattern parameter...%0A%09//------------------------------------------------------------------------------------------------%0A
 %09public 
@@ -919,10 +919,607 @@
 n r;%0A%09%7D%0A
+%09//------------------------------------------------------------------------------------------------%0A%09public static String%09format_hhmmss(long milliseconds)%0A%09%7B%0A%09%09long hours%09=milliseconds/1000/60/60;%0A%09%09milliseconds-=hours*1000*60*60;%0A%09%09long minutes=milliseconds/1000/60;%0A%09%09milliseconds-=minutes*1000*60;%0A%09%09long seconds=milliseconds/1000;%0A%09%09milliseconds-=seconds*1000;%0A%09%09String r=%22%22;%0A%09%09r+=String.format(%22%2502d%22,hours)+%22:%22+String.format(%22%2502d%22,minutes)+%22:%22+String.format(%22%2502d%22,seconds);%0A%09%09return r;%0A%09%7D%0A%09//------------------------------------------------------------------------------------------------%0A
 %7D%0A

Update TimeFormatter.java