polysemy-time-0.1.2.1: Polysemy effect for time
Safe HaskellNone
LanguageHaskell2010

Polysemy.Time.Calendar

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 UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

year :: UTCTime -> Years Source #

HasYear Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

year :: Day -> Years Source #

class HasMonth t where Source #

Extract the month component from a date.

Methods

month :: t -> Months Source #

Instances

Instances details
HasMonth UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

month :: UTCTime -> Months Source #

HasMonth Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

month :: Day -> Months Source #

class HasDay t where Source #

Extract the day component from a date.

Methods

day :: t -> Days Source #

Instances

Instances details
HasDay UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

day :: UTCTime -> Days Source #

HasDay Day Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

day :: Day -> 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 TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

hour :: TimeOfDay -> Hours Source #

HasHour DiffTime Source # 
Instance details

Defined in Polysemy.Time.Calendar

Methods

hour :: DiffTime -> 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 TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

HasMinute DiffTime 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 TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

HasSecond DiffTime 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 TimeOfDay Source # 
Instance details

Defined in Polysemy.Time.Calendar

HasNanoSecond DiffTime 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 :: * Source #

type CalendarTime dt :: * Source #

Instances

Instances details
Calendar UTCTime Source # 
Instance details

Defined in Polysemy.Time.Calendar