Hoogle Search
Within LTS Haskell 24.58 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
showMixedAmountLinesPartsB :: AmountFormat -> MixedAmount -> [(WideBuilder, Amount)]hledger-lib Hledger.Data.Amount Like showMixedAmountLinesB but also returns the amounts associated with each text builder.
showMixedAmountOneLine :: MixedAmount -> Stringhledger-lib Hledger.Data.Amount Get the one-line string representation of a mixed amount (also showing any costs). See showMixedAmountB for special cases.
showMixedAmountOneLineWithoutCost :: Bool -> MixedAmount -> Stringhledger-lib Hledger.Data.Amount Get the one-line string representation of a mixed amount, but without any @ costs. With a True argument, adds ANSI codes to show negative amounts in red. See showMixedAmountB for special cases.
showMixedAmountWith :: AmountFormat -> MixedAmount -> Stringhledger-lib Hledger.Data.Amount Like showMixedAmount but uses the given amount format. See showMixedAmountB for special cases.
showMixedAmountWithZeroCommodity :: MixedAmount -> Stringhledger-lib Hledger.Data.Amount Like showMixedAmount, but zero amounts are shown with their commodity if they have one. See showMixedAmountB for special cases.
showMixedAmountWithoutCost :: Bool -> MixedAmount -> Stringhledger-lib Hledger.Data.Amount Get the string representation of a mixed amount, without showing any costs. With a True argument, adds ANSI codes to show negative amounts in red. See showMixedAmountB for special cases.
styleMixedAmount :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmounthledger-lib Hledger.Data.Amount Deprecated: please use styleAmounts instead
unifyMixedAmount :: MixedAmount -> Maybe Amounthledger-lib Hledger.Data.Amount Unify a MixedAmount to a single commodity value if possible. This consolidates amounts of the same commodity and discards zero amounts; but this one insists on simplifying to a single commodity, and will return Nothing if this is not possible.
fixSmartDate :: Day -> SmartDate -> EFDayhledger-lib Hledger.Data.Dates Convert a SmartDate to a specific date using the provided reference date. This date will be exact or flexible depending on whether the day was specified exactly. (Missing least-significant parts produces a flex date.)
Examples:
>>> :set -XOverloadedStrings >>> let t = fixSmartDateStr (fromGregorian 2008 11 26) >>> t "0000-01-01" "0000-01-01" >>> t "1999-12-02" "1999-12-02" >>> t "1999.12.02" "1999-12-02" >>> t "1999/3/2" "1999-03-02" >>> t "19990302" "1999-03-02" >>> t "2008/2" "2008-02-01" >>> t "0020/2" "0020-02-01" >>> t "1000" "1000-01-01" >>> t "4/2" "2008-04-02" >>> t "2" "2008-11-02" >>> t "January" "2008-01-01" >>> t "feb" "2008-02-01" >>> t "today" "2008-11-26" >>> t "yesterday" "2008-11-25" >>> t "tomorrow" "2008-11-27" >>> t "this day" "2008-11-26" >>> t "last day" "2008-11-25" >>> t "next day" "2008-11-27" >>> t "this week" -- last monday "2008-11-24" >>> t "last week" -- previous monday "2008-11-17" >>> t "next week" -- next monday "2008-12-01" >>> t "this month" "2008-11-01" >>> t "last month" "2008-10-01" >>> t "next month" "2008-12-01" >>> t "this quarter" "2008-10-01" >>> t "last quarter" "2008-07-01" >>> t "next quarter" "2009-01-01" >>> t "this year" "2008-01-01" >>> t "last year" "2007-01-01" >>> t "next year" "2009-01-01"
t "last wed" "2008-11-19" t "next friday" "2008-11-28" t "next january" "2009-01-01">>> t "in 5 days" "2008-12-01" >>> t "in 7 months" "2009-06-01" >>> t "in -2 weeks" "2008-11-10" >>> t "1 quarter ago" "2008-07-01" >>> t "1 week ahead" "2008-12-01"
fixSmartDateStr :: Day -> Text -> Texthledger-lib Hledger.Data.Dates Convert a smart date string to an explicit yyyy/mm/dd string using the provided reference date, or raise an error.