{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Media.Timestamp.Formatting -- License : MIT -- Stability : experimental -- -- Formatting for `Media.Timestamp`. module Media.Timestamp.Formatting ( timef, timecf, ) where import Formatting import Media.Timestamp -- | Formats a `Time` as `hh:mm:ss.mmm`. This is ffmpeg's format. -- -- @since 0.1.0.0 timef :: Format r (Time -> r) timef = accessed hour int % ":" <> accessed minute int % ":" <> accessed second int % "." <> accessed millisecond int -- | Formats a `Time` as `hh:mm:ss,mmm`. This is .srt format. -- -- @since 0.1.0.0 timecf :: Format r (Time -> r) timecf = accessed hour int % ":" <> accessed minute int % ":" <> accessed second int % "," <> accessed millisecond int