Addresses Issue #19 (Currency data can't be handled as a compound type)
The solution amounts to adjusting the UNIT and letting regular currency handling continue as usual (on the theory that a pile of cash is a pile of cash, regardless of whether it is per DAY, per PRSN or per anything else). Regular compound unit checking will proceed as usual (so the part after the "/" probably may need to be a known unit type).
When we are presented with a compound currency unit, it needs to look like USD.2010/DAY or if there is a Multiplier, it will be handled correctly if it looks either like USD.2010.1e3/DAY or USD.2010/DAY.1e3 (new code moves the /DAY part to the base currency unit.
Addresses Issue #19 (Currency data can't be handled as a compound type)
The solution amounts to adjusting the UNIT and letting regular currency handling continue as usual (on the theory that a pile of cash is a pile of cash, regardless of whether it is per DAY, per PRSN or per anything else). Regular compound unit checking will proceed as usual (so the part after the "/" probably may need to be a known unit type).
When we are presented with a compound currency unit, it needs to look like
USD.2010/DAY
or if there is a Multiplier, it will be handled correctly if it looks either likeUSD.2010.1e3/DAY
orUSD.2010/DAY.1e3
(new code moves the/DAY
part to the base currency unit.USD.2008.1e3/DAY
yieldsUNIT=USD/DAY, YEAR=2008, MULTIPLIER=1e3
USD.2008/DAY.1e3
also yieldsUNIT=USD/DAY, YEAR=2008, MULTIPLIER=1e3
USD.2008/DAY
yieldsUNIT=USD/DAY, YEAR=2008, MULTIPLIER=NA
Happy to discuss and adjust further.