Skip to content

Commit

Permalink
Merge pull request #29 from affanshahid/fix-extensions
Browse files Browse the repository at this point in the history
make Int and Double extensions public
  • Loading branch information
BrettRToomey authored Feb 18, 2017
2 parents 1e0a974 + 7ad4107 commit 8d7e0f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Duration+Extensions.swift
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)
}
}

0 comments on commit 8d7e0f7

Please sign in to comment.