Skip to content

Commit 2f02378

Browse files
authored
Fixed "down" typos (#37)
1 parent cce6e9d commit 2f02378

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ To properly show the Sun Date Events use the following DateFormatter.
106106
* Astronomical Dusk
107107
* Astronomical Dawn
108108
* Nautical Dusk
109-
* Nautical Down
109+
* Nautical Dawn
110110
* Morning Blue Hour Time
111111
* Evening Blue Hour Time
112112
* Sun Azimuth at Sunrise

Sources/SunKit/Sun.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public class Sun {
5858

5959
///Date at which there is the Nautical Dusk
6060
public private(set) var nauticalDusk: Date = Date()
61-
///Date at which there is the Nautical Down
62-
public private(set) var nauticalDown: Date = Date()
61+
///Date at which there is the Nautical Dawn
62+
public private(set) var nauticalDawn: Date = Date()
6363

6464
///Date at which there is the Astronomical Dusk
6565
public private(set) var astronomicalDusk: Date = Date()
@@ -324,7 +324,7 @@ public class Sun {
324324
print("Civil dusk -> \(dateFormatter.string(from: civilDusk))")
325325
print("Civil Dawn -> \(dateFormatter.string(from: civilDawn))")
326326
print("Nautical Dusk -> \(dateFormatter.string(from: nauticalDusk))")
327-
print("Nautical Down -> \(dateFormatter.string(from: nauticalDown))")
327+
print("Nautical Dawn -> \(dateFormatter.string(from: nauticalDawn))")
328328
print("Astronomical Dusk -> \(dateFormatter.string(from: astronomicalDusk))")
329329
print("Astronomical Dawn -> \(dateFormatter.string(from: astronomicalDawn))")
330330
print("Morning Blue Hour Start -> \(dateFormatter.string(from: morningBlueHourStart))")
@@ -442,7 +442,7 @@ public class Sun {
442442
self.civilDusk = getCivilDusk() ?? Date()
443443
self.civilDawn = getCivilDawn() ?? Date()
444444
self.nauticalDusk = getNauticalDusk() ?? Date()
445-
self.nauticalDown = getNauticalDown() ?? Date()
445+
self.nauticalDawn = getNauticalDawn() ?? Date()
446446
self.astronomicalDusk = getAstronomicalDusk() ?? Date()
447447
self.astronomicalDawn = getAstronomicalDawn() ?? Date()
448448
self.morningGoldenHourStart = getMorningGoldenHourStart() ?? Date()
@@ -721,12 +721,12 @@ public class Sun {
721721
}
722722

723723
/// Nautical Dusk is when the Sun reaches -12 degrees of elevation.
724-
/// - Returns: Nautical Down
725-
private func getNauticalDown() -> Date? {
726-
guard let nauticalDown = getDateFrom(sunEvent: .nautical, morning: false) else {
724+
/// - Returns: Nautical Dawn
725+
private func getNauticalDawn() -> Date? {
726+
guard let nauticalDawn = getDateFrom(sunEvent: .nautical, morning: false) else {
727727
return nil
728728
}
729-
return nauticalDown
729+
return nauticalDawn
730730
}
731731

732732
/// Astronomical Dusk is when the Sun reaches -18 degrees of elevation.

Tests/SunKitTests/UT_Sun.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ final class UT_Sun: XCTestCase {
100100

101101
var expectednauticalDusk = createDateCustomTimeZone(day: 19, month: 11, year: 2022, hour: 5, minute: 52, seconds: 21,timeZone: timeZoneUnderTest)
102102

103-
var expectednauticalDown = createDateCustomTimeZone(day: 19, month: 11, year: 2022, hour: 17, minute: 44, seconds: 45,timeZone: timeZoneUnderTest)
103+
var expectednauticalDawn = createDateCustomTimeZone(day: 19, month: 11, year: 2022, hour: 17, minute: 44, seconds: 45,timeZone: timeZoneUnderTest)
104104

105105
var expectedastronomicalDusk = createDateCustomTimeZone(day: 19, month: 11, year: 2022, hour: 5, minute: 19, seconds: 25,timeZone: timeZoneUnderTest)
106106

@@ -124,7 +124,7 @@ final class UT_Sun: XCTestCase {
124124
XCTAssertTrue(abs(expectedSolarNoon.timeIntervalSince1970 - sunUnderTest.solarNoon.timeIntervalSince1970) < UT_Sun.sunSetRiseThresholdInSeconds)
125125

126126
XCTAssertTrue(abs(expectednauticalDusk.timeIntervalSince1970 - sunUnderTest.nauticalDusk.timeIntervalSince1970) < UT_Sun.sunSetRiseThresholdInSeconds)
127-
XCTAssertTrue(abs(expectednauticalDown.timeIntervalSince1970 - sunUnderTest.nauticalDown.timeIntervalSince1970) < UT_Sun.sunSetRiseThresholdInSeconds)
127+
XCTAssertTrue(abs(expectednauticalDawn.timeIntervalSince1970 - sunUnderTest.nauticalDawn.timeIntervalSince1970) < UT_Sun.sunSetRiseThresholdInSeconds)
128128

129129
XCTAssertTrue(abs(expectedastronomicalDusk.timeIntervalSince1970 - sunUnderTest.astronomicalDusk.timeIntervalSince1970) < UT_Sun.sunSetRiseThresholdInSeconds)
130130

0 commit comments

Comments
 (0)