MCPcopy Index your code
hub / github.com/ajatkj/scriptable / formatTime

Function formatTime

LSWeather.js:1246–1251  ·  view source on GitHub ↗
(unformattedDate)

Source from the content-addressed store, hash-verified

1244FUNCTION formatTime
1245------------------------------------------------------------------*/
1246function formatTime(unformattedDate){
1247 let date = new Date(unformattedDate);
1248 let hours = "0" + date.getHours();
1249 let minutes = "0" + date.getMinutes();
1250 return hours.substr(-2) + ':' + minutes.substr(-2);
1251}
1252/*------------------------------------------------------------------
1253FUNCTION getTimeDiff
1254------------------------------------------------------------------*/

Callers 1

formatEventsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected