weather-forecast.js
function(time){
  var tempC = parseFloat(time.find('temperature').eq(0).attr('value'));
  return {
    hoursFromNow: Math.ceil(((new Date(time.attr("from"))).getTime() - (new Date()).getTime()) / 1000 / 60 / 60),

    // Celcius is kept decimal since met.no returns a pleasant formatted value. 
    // Fahrenheit is rounded for reasons of laziness. 
    // TODO: format Fahrenheit value.
    tempC: tempC,
    tempF: Math.round((9 / 5 * tempC) + 32)
  };
}
function(time){
  var tempC = parseFloat(time.find('temperature').eq(0).attr('value'));
  return {
    hoursFromNow: Math.ceil(((new Date(time.attr("from"))).getTime() - (new Date()).getTime()) / 1000 / 60 / 60),

    // Celcius is kept decimal since met.no returns a pleasant formatted value. 
    // Fahrenheit is rounded for reasons of laziness. 
    // TODO: format Fahrenheit value.
    tempC: tempC,
    tempF: Math.round((9 / 5 * tempC) + 32)
  };
}
function ( time ) { var tempC = parseFloat ( time . find ( 'temperature' ) . eq ( 0 ) . attr ( 'value' ) ) ; return { hoursFromNow : Math . ceil ( ( ( new Date ( time . attr ( "from" ) ) ) . getTime ( ) - ( new Date ( ) ) . getTime ( ) ) / 1000 / 60 / 60 ) , // Celcius is kept decimal since met.no returns a pleasant formatted value.  // Fahrenheit is rounded for reasons of laziness.  // TODO: format Fahrenheit value. tempC : tempC , tempF : Math . round ( ( 9 / 5 * tempC ) + 32 ) } ; }
return an object with temperature in C and F and a relative ETA in hours for that temperature.
return an object with temperature in C and F and a relative ETA in hours for that temperature .