From 9ed5c92ccd46f323b4a97c7152e24412a25b5208 Mon Sep 17 00:00:00 2001 From: abhir Date: Mon, 22 Jul 2024 22:29:24 +0530 Subject: [PATCH] Initial Commit --- script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 2a72f7c..8155c80 100644 --- a/script.js +++ b/script.js @@ -40,7 +40,9 @@ function addExpense(id,date,name,amount,groupName,description){ newExpense.querySelector('#label2').textContent="₹"+amount; newExpense.querySelector('#label3').textContent=description; newExpense.querySelector('#label4').textContent=groupName; - newExpense.querySelector('#expenseFooter').textContent=date; + let date1=date.split(' '); + let date2=date1[0]+" "+date1[1].substring(0,3)+" "+date1[2]; + newExpense.querySelector('#expenseFooter').textContent=date2; container2.insertBefore(newExpense,lastElement); let expenses=document.getElementsByClassName('expense'); for(let i=0;i