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)
maximize your potential with Daniel-San, a node-based budget-projection engine that helps your routines and finances find balance. The program features text, json, terminal and file-based reporting output, aggregates, multi-currency conversion capability and multi-frequency accounting triggers, including: once, daily, weekly, bi-weekly, tri-weekly, monthly, annually and more. Timezones help to keep your enterprise in sync, while special adjustments allow the movement of process-dates around holidays and weekends via prepay or postpay. Dynamic rule modification allows the injection of growth-and-decay functions. Additionally, the user can create reminder/routine rules for events that won't contribute to the balanceEnding calculation. Extend rule/event properties by adding custom fields. Breathe in through nose, out the mouth. Wax on, wax off. Don't forget to breathe, very important.
Breaking Changes in v11.0.0
see documentation on github
Install, Import & Execute
npm install --save daniel-san
const findBalance = ;const report = ;const STANDARD_EVENT MONTHLY WEEKLY DAILY FRIDAY SATURDAY SUNDAY = ;
Plase note that the format of property values are strict. For example, Years are always strings in the format YYYY, months are always MM, and days are always DD. Weekdays are an integer between 0-6, and times are always strings in the format hh:mm:am or hh:mm:pm (case sensitive on the am and pm).
const danielSan =config:balanceBeginning: 161803 // always required / the final balanceBeginning and balanceEnding results will be added to the root of this danielSan bonsai-treeeffectiveDateStart: '2019-03-20' // always required - inclusive (effectiveDateStart is included in the budget projection)effectiveDateEnd: '2019-12-13' // always required - inclusive (effectiveDateEnd is included in the budget projection)timeStart: null // optional: '09:00am'timeEnd: null // optional: '05:00pm'rules:// rule 1name: 'monthly bitcoin investment'amount: -7983 // negative amount subtracts, positive amount addstype: STANDARD_EVENT // see "Event Types" - import from constants.js / see list of importable constants at the bottom of this readmefrequency: MONTHLYprocessDate: '30' // for MONTHLY events, this string represents the day within that montheffectiveDateStart: '2019-01-01' // date to start evaluating and processing this account, if there is no start date, daniel-san will determine the first process dateeffectiveDateEnd: null // null effectiveDateEnd 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: -970type: STANDARD_EVENT // see "Event Types" - import from constants.jsfrequency: WEEKLYprocessDate: FRIDAY // 0-6 (Number) with 0 representing Sunday - weekday constants are available to be importedeffectiveDateStart: '2019-01-01'effectiveDateEnd: null // null effectiveDateEnd represents an ongoing accountmodulus: 2 // See "Modulus/Cycle" to review this advanced featurecycle: 1 // the modulus/cycle attributes here equate to every other Weekday (in this particular case due to the WEEKLY frequency)// rule 3type: STANDARD_EVENTfrequency: DAILYname: 'cafeteria breakfast'amount: -50effectiveDateStart: '2019-01-01'effectiveDateEnd: nullexclusions:// exclusion matches will still modulate the cycle when using the modulus/cycle featureweekdays: SATURDAY SUNDAY // excluding these weekdays (you could have also just imported the WEEKENDS constant and spreaded it within the array here)dates: '2019-07-04' '2019-09-17' '2019-10-31' // exluding these specific dates (always in this exact string format: YYYY-MM-DD)// rule 4name: 'fitness routine'type: STANDARD_EVENT_ROUTINE // no amount field neededfrequency: WEEKLYprocessDate: SATURDAYeffectiveDateStart: '2019-01-01'effectiveDateEnd: nullnote: '20 minutes of jogging, 20 minutes of cycling, free weights'// rule 5name: 'new years party arrangements'type: STANDARD_EVENT_REMINDER // no amount field neededfrequency: DAILY // no processDate needed for DAILY eventseffectiveDateStart: '2020-12-13'effectiveDateEnd: '2020-12-21' // remind me daily until the 21stnote: 'finalize arrangements for the party'events: // future balance projections stored here and a balanceEnding field is assigned to each event;const craneKick = ;