Copyright 2019 Jared Boice (MIT License / Open Source)
Daniel-San - Summarized Documentation
get the full documentation at gitHub.
Donations - Bitcoin: 19XgiRojJnv9VDhyW9HmF6oKQeVc7k9McU
(use this address until 2022)
Daniel-San is a node-based budget-projection engine that helps your finances find balance. The program features multi-currency conversion, multi-frequency accounting triggers, including: once, daily, weekly, bi-weekly, tri-weekly, monthly, annually and more. And special adjustments allow the movement of process-dates around holidays and weekends via prepay or postpay. The user can create reminder/routine rules for events that won't contribute to the endBalance calculation. And beyond that, daniel-san is completely customizable. Create your own custom properties that you track on your own. Breathe in through nose, out the mouth. Wax on, wax off. Don't forget to breathe, very important.
Breaking Change in v3.0
In v3.0, the currencyConversion function parameters have changed from currentSymbol and futureSymbol to inputSymbol and outputSymbol, respectively. Because naming things is hard.
Install, Import & Execute
npm install --save daniel-san
const findBalance = ;const terminal = ;const STANDARD_EVENT MONTHLY WEEKLY DAILY FRIDAY SATURDAY SUNDAY = ;
Defining Accounts/Cashflow Rules
const danielSan =beginBalance: 161803endBalance: null // future end balance is stored heredateStart: '2019-03-20' // always required - inclusive (dateStart is included in the budget projection)dateEnd: '2019-12-13' // required except when using the STANDARD_EVENT with a frequency of ONCE - inclusive (dateEnd is included in the budget projection)rules:// rule 1name: 'monthly bitcoin investment'amount: -7983 // negative amount subtracts, positive amount addstype: STANDARD_EVENT // see "Event Types" - import from constants.jsfrequency: MONTHLYprocessDate: '30' // for MONTHLY events, this string represents the day within that monthdateStart: '2019-01-01' // date to start evaluating and processing this account, if there is no start date, daniel-san will try to determine the first process datedateEnd: null // null dateEnd represents an ongoing accountmodulus: 1 // not required - for BIWEEKLY / BIMONTHLY types of events - see "Modulus/Cycle" to review this advanced featurecycle: 1 // not required - for BIWEEKLY / BIMONTHLY types of events - see "Modulus/Cycle" to review this advanced feature// rule 2name: 'shenanigans'amount: -9700type: STANDARD_EVENT // see "Event Types" - import from constants.jsfrequency: WEEKLYprocessDate: FRIDAY // 0-6 with 0 representing Sunday - weekday constants are available to be importeddateStart: '2019-01-01'dateEnd: nullmodulus: 2 // the modulus/cycle attributes here equate to every other Weekday (in this particular case due to the WEEKLY frequency)cycle: 1// rule 3type: STANDARD_EVENTfrequency: DAILYname: 'cafeteria breakfast'amount: -500dateStart: '2019-01-01'dateEnd: nullexclusions: // (exclusion hits will still cycle the modulus for STANDARD_EVENTSweekdays: SATURDAY SUNDAY // excluding these weekdaysdates: '2019-07-04' '2019-09-17' '2019-10-31' // exluding these specific datesevents: // future balance projections stored here;const craneKick = ;