Skip to content

Commit 61786d2

Browse files
committed
Fix GPXCopyright year issue
1 parent 65f13b6 commit 61786d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Classes/GPXCopyright.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ open class GPXCopyright: GPXElement {
5151
public init(author: String) {
5252
super.init()
5353
self.author = author
54+
self.year = Date()
5455
}
5556

5657
/// For internal use only
@@ -90,7 +91,7 @@ open class GPXCopyright: GPXElement {
9091

9192
override func addChildTag(toGPX gpx: NSMutableString, indentationLevel: Int) {
9293
super.addChildTag(toGPX: gpx, indentationLevel: indentationLevel)
93-
self.addProperty(forValue: Convert.toString(from: year), gpx: gpx, tagName: "year", indentationLevel: indentationLevel)
94+
self.addProperty(forValue: Convert.toString(fromYear: year), gpx: gpx, tagName: "year", indentationLevel: indentationLevel)
9495
self.addProperty(forValue: license, gpx: gpx, tagName: "license", indentationLevel: indentationLevel)
9596
}
9697
}

0 commit comments

Comments
 (0)