diff --git a/main.py b/main.py
index e7f847f..357b64a 100644
--- a/main.py
+++ b/main.py
@@ -102,7 +102,8 @@ def index():
# now work out how much padding we need in the first year to align the last dates for all years
padding=second_count - first_count
- return render_template('index.html', now=now, first_yr=first_yr, padding=padding, finance=finance_data, depletion_date=depletion_date, savings=savings_per_fortnight, BUDGET=BUDGET, COMP=COMP, DISP=DISP)
+ key_dates = calc_key_dates( finance_data )
+ return render_template('index.html', now=now, first_yr=first_yr, padding=padding, finance=finance_data, depletion_date=depletion_date, savings=savings_per_fortnight, BUDGET=BUDGET, COMP=COMP, DISP=DISP, key_dates=key_dates)
@app.route('/save', methods=['POST'])
def save():
diff --git a/templates/index.html b/templates/index.html
index 562bfd1..0290d72 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -99,19 +99,38 @@
{% endfor %}
+ {% set car_done=namespace( val=0 ) %}
+
{% for date, dollars in savings %}
{% set yr=date[:4] %}
{% set mon=date[5:7] %}
{% set day=date[8:10 ] %}
+ {% set car_yr=key_dates['D_hyundai_owned'][:4] %}
+ {% set car_mon=key_dates['D_hyundai_owned'][5:7] %}
+ {% set car_day=key_dates['D_hyundai_owned'][8:10 ] %}
+
{% if yr|int > first_yr|int and mon == '01' and day|int <= 14 %}