您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Manfraid 9d71866508 Ajout script sunrise 3 年前
.gitignore initial commit 3 年前
README.md Ajout script sunrise 3 年前
sunrise.py Ajout script sunrise 3 年前

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))