<?xml version="1.0" encoding = "utf-8"?>

<snippet xmlns:MMString="http://www.macromedia.com/schemes/dat/string/" MMString:name = "Snippets/JavaScript/conversions/time_conversion/secondsToHours_csn/snippet/name/Seconds" MMString:description = "Snippets/JavaScript/conversions/time_conversion/secondsToHours_csn/snippet/description/Converts" preview="code" type="block">

<insertText location="beforeSelection">

<![CDATA[function secondsToHours(sec)

{

  var hrs = Math.floor(sec/3600);

  var min = Math.floor((sec%3600)/60);

  sec = sec % 60;

  if(sec<10) sec = "0" + sec;

  if(min<10) min = "0" + min;

  return hrs + ":" + min + ":" + sec;

}

]]>

</insertText>

<insertText location="afterSelection"><![CDATA[]]>

</insertText>

</snippet>

