Skip to content

Commit

Permalink
format date
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
Ivan Vnucec committed Dec 18, 2023
1 parent edf8ff1 commit 11b9c6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ <h1>Neradni dani u Hrvatskoj</h1>
row.appendChild(dateNameCell);

// datum
const months = ["siječnja", "veljače", "ožujka", "travnja", "svibnja", "lipnja", "srpnja", "kolovoza", "rujna", "listopada", "studenog", "prosinca"];
var dateCell = document.createElement("td");
dateCell.innerHTML = holiday.date.toLocaleDateString();
dateCell.innerHTML = holiday.date.getDate() + ". " + months[holiday.date.getMonth()] + " " + holiday.date.getFullYear() + ".";
row.appendChild(dateCell);

// preostalo dana
Expand Down

0 comments on commit 11b9c6e

Please sign in to comment.