Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebornian48 committed Jan 13, 2024
1 parent e3fb4be commit c637093
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function parseNIK() {

jk = parseInt(tgl, 10) / 40;
jk = Math.floor(jk);
if (jk == 1) {
if (jk === 1) {
jk = "Perempuan";
} else {
jk = "Laki-laki";
Expand All @@ -49,7 +49,8 @@ function parseNIK() {
// Parse the date
var date = new Date(thn, parseInt(bln, 10) - 1, tgl % 40);
var d1 = new Date("2014-01-28");
var selisih = Math.floor(Math.abs(d1 - date) / 86400000);
var d = 86400000;
var selisih = Math.floor(Math.abs(d1 - date) / d);
var pasar = pasaran[selisih % 5];
// Parse the date for human
var idDate = new Intl.DateTimeFormat("id-ID", {
Expand Down

0 comments on commit c637093

Please sign in to comment.