Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/time/span.cr
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ struct Time::Span
# 1.second.zero? # => false
# ```
def zero? : Bool
self == ZERO
self == Span.zero
end

# Returns `true` if `self` represents a positive time span.
Expand All @@ -398,7 +398,7 @@ struct Time::Span
# -3.days.positive? # => false
# ```
def positive? : Bool
self > ZERO
self > Span.zero
end

# Returns `true` if `self` represents a negative time span.
Expand All @@ -409,7 +409,7 @@ struct Time::Span
# -3.days.negative? # => true
# ```
def negative? : Bool
self < ZERO
self < Span.zero
end
end

Expand Down
Loading