Copyright | (C) 2016 Jason Johnson |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Jason Johnson <jason.johnson.081@gmail.com> |
Stability | experimental |
Portability | TBD |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
An Offset
is a period of time offset from UTC time. This module contains constructors and functions for working with Offsets
.
Clamping
An offset must be between 18 hours and -18 hours (inclusive). If you go outside this range the functions will clamp to the nearest value.
Synopsis
- data Offset
- empty :: Offset
- fromSeconds :: Integral a => a -> Offset
- fromMinutes :: Integral a => a -> Offset
- fromHours :: Integral a => a -> Offset
- seconds :: Functor f => (Int -> f Int) -> Offset -> f Offset
- minutes :: Functor f => (Int -> f Int) -> Offset -> f Offset
- hours :: Functor f => (Int -> f Int) -> Offset -> f Offset
- addClamped :: Offset -> Offset -> Offset
- minusClamped :: Offset -> Offset -> Offset
Types
Constructors
Lenses
seconds :: Functor f => (Int -> f Int) -> Offset -> f Offset Source #
Lens for the seconds component of the Offset
minutes :: Functor f => (Int -> f Int) -> Offset -> f Offset Source #
Lens for the minutes component of the Offset
hours :: Functor f => (Int -> f Int) -> Offset -> f Offset Source #
Lens for the hours component of the Offset