 secondsToHours
Convert seconds to hours.
Description
Convert a number of seconds to a full number of hours.

Usage
// CommonJS
var secondsToHours = require('date-fns/secondsToHours')
// ES 2015
import secondsToHours from 'date-fns/secondsToHours'
// ESM
import { secondsToHours } from 'date-fns'
Syntax
secondsToHours(seconds)
Arguments


Name
Description


seconds
number of seconds to be converted



Returns


Description


the number of seconds converted in hours



Exceptions


Type
Description


TypeError
1 argument required



Examples
// Convert 7200 seconds into hours
const result = secondsToHours(7200)
//=> 2
// It uses floor rounding:
const result = secondsToHours(7199)
//=> 1


                
{'path': 'public/docs/date_fns/secondsToHours.html', 'source': 'DevDocs.IO'}