Commit 28a2890a authored by Daniel Firth's avatar Daniel Firth
Browse files

Add rangeaf formatter

No related merge requests found
Pipeline #147 failed with stage
in 1 second
# Changelog for simple-media-timestamp-formatting
## v0.1.1.0
* Add `rangeaf` formatter.
## v0.1.0.0
* Add formatters for ffmpeg's timestamp format and srt's timestamp format.
name: simple-media-timestamp-formatting
version: 0.1.0.0
version: 0.1.1.0
git: "https://gitlab.com/homotopic-tech/simple-media-timestamp-formatting"
license: MIT
author: "Daniel Firth"
......
......@@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack
name: simple-media-timestamp-formatting
version: 0.1.0.0
version: 0.1.1.0
synopsis: Formatting for simple-media-timestamp
description: Please see the README on GitHub at <https://github.com/githubuser/simple-media-timestamp-formatting#readme>
category: Media
......
......@@ -9,6 +9,7 @@
module Media.Timestamp.Formatting
( timef,
timecf,
rangeaf,
)
where
......@@ -26,3 +27,10 @@ timef = accessed hour int % ":" <> accessed minute int % ":" <> accessed second
-- @since 0.1.0.0
timecf :: Format r (Time -> r)
timecf = accessed hour int % ":" <> accessed minute int % ":" <> accessed second int % "," <> accessed millisecond int
-- | Formats a `Range` as "X --> Y", Formatter for SRT format will
-- therefore be rangeaf timecf.
--
-- @since 0.1.1.0
rangeaf :: Format r (Time -> r) -> Format r (Range -> r)
rangeaf x = accessed from x % " --> " <> accessed to x
resolver: nightly-2021-07-17
resolver: nightly-2021-07-23
packages:
- .
extra-deps:
- simple-media-timestamp-0.2.0.0
......@@ -3,17 +3,10 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files
packages:
- completed:
hackage: simple-media-timestamp-0.2.0.0@sha256:f18dcbc62af2678ab09baae27d15aa873e00d412ec4640654a859cda226e40f3,799
pantry-tree:
size: 280
sha256: 8baa7f9878c4ed2ce25b6350d416cdc378f5749061bfc7bd863cb834c7552144
original:
hackage: simple-media-timestamp-0.2.0.0
packages: []
snapshots:
- completed:
size: 556830
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2021/7/17.yaml
sha256: 387c17971aa47d4ca9e9af0223fa0010d5cc9ef360cca72cd17419a90d83cec8
original: nightly-2021-07-17
size: 567260
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2021/7/23.yaml
sha256: 94c5e73c2221ce53348504de8916c960a78a97bdc6ff0921200a42773694bd7c
original: nightly-2021-07-23
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment