Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Manfraid 9d71866508 Ajout script sunrise pirms 3 gadiem
.gitignore initial commit pirms 3 gadiem
README.md Ajout script sunrise pirms 3 gadiem
sunrise.py Ajout script sunrise pirms 3 gadiem

README.md

ScriptPython

Sunrise

script permettant de calculer le lever et le coucher du soleil a une date et un lieu précis

from sunrise import sunriseClass
import datetime
import time

thisDay=datetime.date.today()
mySunrise=sunriseClass()
mySunrise.setNumericalDate(thisDay.day,thisDay.month,thisDay.year)
#mySunrise.setLocation(34.052222,-118.243611) # Los Angeles, UTC -8
#mySunrise.setLocation(41.012222,28.975833) # Istanbul, UTC +2
mySunrise.setLocation(48.856667,2.350833) # Paris, UTC +1
#mySunrise.setLocation(46.711667,4.696667) # renseigner votre location 
mySunrise.calculateWithUTC(+(1+time.localtime().tm_isdst))
 
coucher = mySunrise.sunset 
lever = mySunrise.sunrise
print("Heure lever {}".format(mySunrise.sunriseTime))
print("Heure coucher {}".format(mySunrise.sunsetTime))