Safe Haskell | Safe-Infered |
---|
- price :: DefaultTimeZone -> RadGroup -> Parser PricePoint
- render :: DefaultTimeZone -> (GroupingSpec, GroupingSpec) -> RadGroup -> PricePoint -> Maybe Text
Documentation
price :: DefaultTimeZone -> RadGroup -> Parser PricePointSource
A price with an EOL and whitespace after the EOL. price d r
will parse a PriceBox, where d
is the DefaultTimeZone for the
DateTime in the PricePoint, and r
is the radix point and grouping
character to parse the Amount. Fails if the price is not valid
(e.g. the from and to commodities are the same).
render :: DefaultTimeZone -> (GroupingSpec, GroupingSpec) -> RadGroup -> PricePoint -> Maybe TextSource
render dtz rg f pp
renders a price point pp
. dtz
is the
DefaultTimeZone for rendering of the DateTime in the Price
Point. rg
is the radix point and grouping character for the
amount. f
is the Format for how the price will be
formatted. Fails if either the From or the To commodity cannot be
rendered.