File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
.swiftpm/xcode/package.xcworkspace/xcuserdata/nmariniello.xcuserdatad Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -157,15 +157,15 @@ public class Sun {
157157 /// Returns True if is night
158158 public var isNight : Bool {
159159 if !isCircumPolar {
160- return date < civilDusk || date > civilDawn
160+ return date < sunrise || date > sunset
161161 } else {
162162 return isAlwaysNight
163163 }
164164 }
165165
166166 /// Returns True if is twilight time
167167 public var isTwilight : Bool {
168- ( astronomicalDusk <= date && date <= sunrise) || ( sunset <= date && date <= astronomicalDawn)
168+ ( astronomicalDusk <= date && date < sunrise) || ( sunset < date && date <= astronomicalDawn)
169169 }
170170
171171 /// Returns True if we are in evening golden hour range
@@ -201,11 +201,11 @@ public class Sun {
201201
202202 /// Returns true if we are near the pole and we are in a situation in which Sun Events during the day could have no meaning
203203 public var isCircumPolar : Bool {
204- isAlwaysLight || isAlwaysNight
204+ isAlwaysDay || isAlwaysNight
205205 }
206206
207207 /// Returns true if for (Location,Date) is always daylight (e.g Tromso city in summer)
208- public var isAlwaysLight : Bool {
208+ public var isAlwaysDay : Bool {
209209 let startOfTheDay = calendar. startOfDay ( for: date)
210210 let almostNextDay = startOfTheDay + Double( SECONDS_IN_ONE_DAY)
211211
You can’t perform that action at this time.
0 commit comments