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

Data.Tax.ATO.FY

Description

Types and functions related to financial years.

Synopsis

Documentation

data Days (n :: Nat) 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.FY

Methods

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

show :: Days n -> String #

showList :: [Days n] -> ShowS #

days :: forall a. FinancialYear 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. FinancialYear 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. (FinancialYear a, Fractional frac) => Days a -> frac Source #

Get the number of days as a fractional value. The denominator is determined by the year type.

financialYear :: Day -> Year Source #

The financial year in which the given day falls.

financialYearRange :: Year -> (Day, Day) Source #

Get the range of days (inclusive) for the financial year (July to June) ending in the given year.

financialYearRangeFromProxy :: forall n. FinancialYear n => Proxy n -> (Day, Day) Source #

Get the financial year range (inclusive) for the given type-level financial year. See also financialYearRange.