hodatime-0.2.2.1: A fully featured date/time library based on Nodatime
Copyright(C) 2016 Jason Johnson
LicenseBSD-style (see the file LICENSE)
MaintainerJason Johnson <jason.johnson.081@gmail.com>
Stabilityexperimental
PortabilityTBD
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.HodaTime.LocalTime

Description

An LocalTime represents a time of day, with no reference to a particular calendar, time zone or date. This module contains constructors and functions for working with LocalTime.

Normalization

A clock time can be from 00:00:00.000 to 23:59:59.99.. Adding 1 minute to 23:59:00 will cause it to roll over to 00:00:00.

Synopsis

Types

data LocalTime Source #

Represents a specific time of day with no reference to any calendar, date or time zone.

class HasLocalTime lt where Source #

Methods

hour :: Functor f => (Hour -> f Hour) -> lt -> f lt Source #

Lens for the hour component of the LocalTime

minute :: Functor f => (Minute -> f Minute) -> lt -> f lt Source #

Lens for the minute component of the LocalTime

second :: Functor f => (Second -> f Second) -> lt -> f lt Source #

Lens for the second component of the LocalTime

nanosecond :: Functor f => (Nanosecond -> f Nanosecond) -> lt -> f lt Source #

Lens for the nanoseconds component of the LocalTime. NOTE: no effort is made to detect nano overflow. They will simply roll over on overflow without affecting the rest of the time.

type Hour = Int Source #

Constructors

localTime :: MonadThrow m => Hour -> Minute -> Second -> Nanosecond -> m LocalTime Source #

Create a new LocalTime from an hour, minute, second and nanosecond if values are valid

Exceptions