class Cronic::Timespan

Overview

A Timespan is a container for a time-span.

Defined in:

cronic/span.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(begin __arg0 : Time, end __arg1 : Time) #

[View source]

Instance Method Detail

def +(seconds : Int32) : Timespan #

Add an integer number of seconds to this span, returning a new Timespan


[View source]
def +(seconds : Time::Span) : Timespan #

Add a Time::Span to this span, returning a new Timespan


[View source]
def -(seconds) : Timespan #

Subtract a number of seconds to this span, returning a new Timespan


[View source]
def begin : Time #

[View source]
def end : Time #

[View source]
def includes?(val) : Bool #

Returns true if the time is between begin and end, inclusive.


[View source]
def inspect(io) #

Prints this span in a nice fashion for inspection purposes


[View source]
def middle : Time #

Returns a Time that is in the middle of this span


[View source]
def precision #

[View source]
def precision=(precision) #

[View source]
def to_s(io) #

Prints this span in a nice fashion


[View source]
def width : Int #

Returns the width of this span in seconds


[View source]