Initial impl of depreciation function.
[?]
Mar 26, 2014, 1:54 AM
A2J7B4SCCJYKQV3G2LDHEFNE2GUICO3N3Y5FKF4EUZW5AG7PTDWACDependencies
- [2]
P6NR2CGXBeginning of implementation of depreciation. - [3]
N4NDAZYTInitial implementation of payouts. - [4]
Y35QCWYWMinor improvement in WorkIndex type to eliminate duplicated information. - [*]
NVOCQVASInitial failing tests. - [*]
7DBNV3GVInitial, stack-based impl of time log event reduction.
Change contents
- edit in src/Ananke/TimeLog.hs at line 20[7.119][6.1028]
import Data.Ratio - edit in src/Ananke/TimeLog.hs at line 107
newtype Months = Months IntegermonthsLength :: Months -> NominalDiffTimemonthsLength (Months i) = fromInteger $ 60 * 60 * 24 * 30 * ilinearDepreciation :: Months -> Months -> DepreciationlinearDepreciation undepPeriod depPeriod =let maxDepreciable :: NominalDiffTimemaxDepreciable = monthsLength undepPeriod + monthsLength depPeriod - replacement in src/Ananke/TimeLog.hs at line 118
linearDepreciation :: DepreciationlinearDepreciation =let depf = undefinedDepreciation depf[3.971]zeroTime :: NominalDiffTimezeroTime = fromInteger 0depf :: NominalDiffTime -> Rationaldepf dt = if dt < monthsLength undepPeriodthen 1else toRational (max zeroTime (maxDepreciable - dt)) / toRational maxDepreciablein Depreciation depf