Skip to content

Commit

Permalink
updates to python to remove negative
Browse files Browse the repository at this point in the history
  • Loading branch information
Crucial-hash committed Apr 27, 2023
1 parent 04ac576 commit 85f091a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion adhan.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,16 @@ diff_hour = int(diff_seconds // 3600)
diff_minute = int((diff_seconds % 3600) // 60)


if diff_hour < 0:
diff_hour += 24
diff_minute *= 1


with open('name.txt', 'w') as file:
file.write(f'{next_prayer}\n')

with open('hours.txt', 'w') as file:
file.write(f'{diff_hour}\n')

with open('minutes.txt', 'w') as file:
file.write(f'{diff_minute}\n')
file.write(f'{diff_minute}\n')
12 changes: 6 additions & 6 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ window.setInterval(function(){

//AUSTRALIA TO AZERBAIJAN

if (tracktime >= '04020730') { setProperties("/clock/image/azerbaijan.png","38.5%","-20%","680%","161%","/clock/image/azerbaijanflag.png","64%","173%","28 - 30 April","P1 Q P2 S R","Azerbaijan") }
if (tracktime >= '04020730') { setProperties("/clock/image/azerbaijan.png","38.5%","-20%","680%","161%","/clock/image/azerbaijanflag.png","64%","173%","28 - 30 April","P1 Q SS S R","Azerbaijan") }

//AZERBAIJAN TO MIAMI

Expand All @@ -150,7 +150,7 @@ window.setInterval(function(){

//CANADA TO AUSTRIA

if (tracktime >= '06182030') { setProperties("/clock/image/austria.png","43%","-20%","670%","160%","/clock/image/austriaflag.png","61.4%","165%","31 - 02 June/July","P1 Q P2 S R","Austria") }
if (tracktime >= '06182030') { setProperties("/clock/image/austria.png","43%","-20%","670%","160%","/clock/image/austriaflag.png","61.4%","165%","31 - 02 June/July","P1 Q SS S R","Austria") }

//AUSTRIA TO BRITAIN

Expand All @@ -162,7 +162,7 @@ window.setInterval(function(){

//HUNGARY TO BELGIUM

if (tracktime >= '07231530') { setProperties("/clock/image/belgium.png","37.5%","-24%","630%","140%","/clock/image/belgiumflag.png","62.5%","145%","28 - 30 July","P1 Q P2 S R","Belgium") }
if (tracktime >= '07231530') { setProperties("/clock/image/belgium.png","37.5%","-24%","630%","140%","/clock/image/belgiumflag.png","62.5%","145%","28 - 30 July","P1 Q SS S R","Belgium") }

//BELGIUM TO NETHERLANDS

Expand All @@ -182,19 +182,19 @@ window.setInterval(function(){

//JAPAN TO QATAR

if (tracktime >= '09240730') { setProperties("/clock/image/qatar.png","41%","-24%","645%","140%","/clock/image/qatarflag.png","66%","145%","06 - 08 Oct","P1 Q P2 S R","Qatar") }
if (tracktime >= '09240730') { setProperties("/clock/image/qatar.png","41%","-24%","645%","140%","/clock/image/qatarflag.png","66%","145%","06 - 08 Oct","P1 Q SS S R","Qatar") }

//QATAR TO UNITED STATES

if (tracktime >= '10081630') { setProperties("/clock/image/cota.png","37.5%","-16%","690%","205%","/clock/image/usaflag.png","63%","185%","20 - 22 Oct","P1 Q P2 S R","United States") }
if (tracktime >= '10081630') { setProperties("/clock/image/cota.png","37.5%","-16%","690%","205%","/clock/image/usaflag.png","63%","185%","20 - 22 Oct","P1 Q SS S R","United States") }

//UNITED STATES TO MEXICO

if (tracktime >= '10222130') { setProperties("/clock/image/mexico.png","40%","-24%","640%","140%","/clock/image/mexicoflag.png","65%","145%","27 - 29 Oct","P1 P2 P3 Q R","Mexico") }

//MEXICO TO BRAZIL

if (tracktime >= '10292130') { setProperties("/clock/image/brazil.png","40%","-24%","640%","140%","/clock/image/brazilflag.png","65%","145%","03 - 05 Nov","P1 Q P2 S R","Brazil") }
if (tracktime >= '10292130') { setProperties("/clock/image/brazil.png","40%","-24%","640%","140%","/clock/image/brazilflag.png","65%","145%","03 - 05 Nov","P1 Q SS S R","Brazil") }

//BRAZIL TO LAS VEGAS

Expand Down

0 comments on commit 85f091a

Please sign in to comment.