Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Change numbers to persian
Browse files Browse the repository at this point in the history
  • Loading branch information
Thecode764 committed May 27, 2024
1 parent 4c8edc5 commit 5fc5990
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ <h2 class="!my-0 pb-1 font-bold !leading-none">خوش آمدید</h2>
// inline configurations
const date = new Date();
document.getElementById("time").innerHTML = new Intl.DateTimeFormat('fa-u-ca-persian', { dateStyle: 'full' }).format(date);

const readingTimeElement = document.getElementById("read-time");
const readingTimeNumber = parseFloat(readingTimeElement.textContent);
readingTimeElement.innerHTML = readingTimeNumber.toLocaleString('fa') + ' دقیقه'
</script>


Expand Down
4 changes: 4 additions & 0 deletions public/welcome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ <h1 class="!my-0 pb-2.5">خوش آمدید</h1>
// inline configurations
const date = new Date();
document.getElementById("time").innerHTML = new Intl.DateTimeFormat('fa-u-ca-persian', { dateStyle: 'full' }).format(date);

const readingTimeElement = document.getElementById("read-time");
const readingTimeNumber = parseFloat(readingTimeElement.textContent);
readingTimeElement.innerHTML = readingTimeNumber.toLocaleString('fa') + ' دقیقه'
</script>

</header>
Expand Down
4 changes: 4 additions & 0 deletions templates/partials/page_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
// inline configurations
const date = new Date();
document.getElementById("time").innerHTML = new Intl.DateTimeFormat('fa-u-ca-persian', { dateStyle: 'full' }).format(date);

const readingTimeElement = document.getElementById("read-time");
const readingTimeNumber = parseFloat(readingTimeElement.textContent);
readingTimeElement.innerHTML = readingTimeNumber.toLocaleString('fa') + ' دقیقه'
</script>

0 comments on commit 5fc5990

Please sign in to comment.