import differenceInMilliseconds from '../differenceInMilliseconds/index' ; import type { RoundingOptions } from '../types' ; import requiredArgs from '../_lib/requiredArgs/index' ; import { getRoundingMethod } from '../_lib/roundingMethods/index' ; name category summary description param { Date | Number } dateLeft param { Date | Number } dateRight param options param { String } options . roundingMethod returns { Number } throws example export default function differenceInSeconds ( dateLeft , dateRight , options ? ) { requiredArgs ( 2 , arguments ) ; const diff = differenceInMilliseconds ( dateLeft , dateRight ) / 1000 ; return getRoundingMethod ( options ?. roundingMethod ) ( diff ) ; }