polysemy-time-0.6.0.0: Polysemy effects for time
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Time.Calendar

Description

Classes for constructing datetime values and extracting time components, Internal

Synopsis

Documentation

class HasDate t d | t -> d where Source #

Methods

date :: t -> d Source #

dateToTime :: d -> t Source #

Instances

Instances details
HasDate UTCTime Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

class HasYear t where Source #

Extract the year component from a date.

Methods

year :: t -> Years Source #

Instances

Instances details
HasYear Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

year :: Day -> Years Source #

HasYear UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

year :: UTCTime -> Years Source #

class HasMonth t where Source #

Extract the month component from a date.

Methods

month :: t -> Months Source #

Instances

Instances details
HasMonth Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

month :: Day -> Months Source #

HasMonth UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

month :: UTCTime -> Months Source #

class HasDay t where Source #

Extract the day component from a date.

Methods

day :: t -> Days Source #

Instances

Instances details
HasDay Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

day :: Day -> Days Source #

HasDay UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

day :: UTCTime -> Days Source #

class HasHour t where Source #

Extract the hour component from a datetime or time.

Methods

hour :: t -> Hours Source #

Instances

Instances details
HasHour DiffTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

hour :: DiffTime -> Hours Source #

HasHour TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

hour :: TimeOfDay -> Hours Source #

class HasMinute t where Source #

Extract the minute component from a datetime or time.

Methods

minute :: t -> Minutes Source #

Instances

Instances details
HasMinute DiffTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

HasMinute TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

class HasSecond t where Source #

Extract the second component from a datetime or time.

Methods

second :: t -> Seconds Source #

Instances

Instances details
HasSecond DiffTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

HasSecond TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

class HasNanoSecond t where Source #

Extract the nanosecond component from a datetime or time.

Instances

Instances details
HasNanoSecond DiffTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

HasNanoSecond TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

class Calendar dt where Source #

Construct datetimes, dates or times from integers.

Associated Types

type CalendarDate dt :: Type Source #

type CalendarTime dt :: Type Source #

Instances

Instances details
Calendar UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar