tax-ato-2023.2: Tax types and computations for Australia
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Tax.ATO.Days

Description

Types for representing a number of days in a year.

Synopsis

Documentation

data Days (n :: Year) Source #

Some number of days in a year. Use days to construct.

Instances

Instances details
Show (Days n) Source # 
Instance details

Defined in Data.Tax.ATO.Days

Methods

showsPrec :: Int -> Days n -> ShowS #

show :: Days n -> String #

showList :: [Days n] -> ShowS #

days :: forall a. DaysInYear a => Integer -> Days a Source #

Construct a Days value. If out of range, the number of days is clamped to 0 or 365/366 (no runtime errors).

daysAll :: forall a. DaysInYear a => Days a Source #

Every day of the year

daysNone :: Days a Source #

Zero days of the year

getDays :: Days n -> Integer Source #

Get the number of days, which is between 0 and 365/366 inclusive.

getFraction :: forall a frac. (DaysInYear a, Fractional frac) => Days a -> frac Source #

Get the number of days as a fractional value. Information about the the year type is discarded.