-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from affanshahid/fix-extensions
make Int and Double extensions public
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
extension Int { | ||
/// Converts the integer into an enum representation of seconds. | ||
var seconds: Duration { | ||
public var seconds: Duration { | ||
return .seconds(Double(self)) | ||
} | ||
|
||
/// Converts the integer into an enum representation of days. | ||
var days: Duration { | ||
public var days: Duration { | ||
return .days(self) | ||
} | ||
|
||
/// Converts the integer into an enum representation of weeks. | ||
var weeks: Duration { | ||
public var weeks: Duration { | ||
return .weeks(self) | ||
} | ||
} | ||
|
||
extension Double { | ||
/// Converts the real into an enum representation of seconds. | ||
var seconds: Duration { | ||
public var seconds: Duration { | ||
return .seconds(self) | ||
} | ||
} |