The endind timestamp of the span (inclusive).
The starting timestamp of the span (inclusive).
Whether this span starts and ends on the same timestamp.
Compares the given timestamp to this span. If the timestamp is before this
span then -1
is returned, if the timestamp is after this span then 1
us returned, otherwise 0
is returned when the timestamp is in this span.
The timestamp to compare to.
-1
, 0
, or 1
depending on the given timestamp relative to
this span.
Determines whether the given timestamp lies between the start and end timestamp.
The timestamp to test.
True if the day is >= the start and <= the end of this span.
Calculates the number of days between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Returns a delta value between 0 and 1 which represents where the DaySpan.end is relative to the given day. The delta value would be greater than 1 if the end of the event is after the given day.
The day to find the end delta relative to.
A number between 0 and 1 if the end of this span is in the 24-hour period starting at the given timestamp, otherwise the value returned may be less than 0 or greater than 1.
Calculates the bounds for span event if it were placed in a rectangle which represents a day (24 hour period). By default the returned values are between 0 and 1 and can be scaled by the proper rectangle dimensions or the rectangle dimensions can be passed to this function.
The day to find the bounds relative to. If this is not the start of the day the returned bounds is relative to the given time.
The height of the rectangle of the day.
The width of the rectangle of the day.
The offset in the rectangle of the day to adjust this span by. This also reduces the width of the returned bounds to keep the bounds in the rectangle of the day.
true
if the bounds should stay in the day rectangle, false
and the bounds may go outside the rectangle of the day for multi-day
spans.
How much to translate the left & right properties by.
How much to translate the top & bottom properties by.
The calculated bounds for this span.
Calculates the number of hours between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Determines whether the gven span intersects with this span.
The span to test.
true
if the spans intersect, otherwise false
.
Determines whether the given timestamp is between the start and end timestamp or lies on the same day as the start or end timestamp.
The timestamp to test.
Determines whether the given timestamp is between the start and end timestamp or lies on the same month as the start or end timestamp.
The timestamp to test.
Determines whether the given timestamp is between the start and end timestamp or lies on the same week as the start or end timestamp.
The timestamp to test.
Determines whether the given timestamp is between the start and end timestamp or lies on the same year as the start or end timestamp.
The timestamp to test.
Calculates the number of milliseconds between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Calculates the number of minutes between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Calculates the number of months between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Calculates the number of seconds between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Returns a delta value between 0 and 1 which represents where the DaySpan.start is relative to the given day. The delta value would be less than 0 if the start of the event is before the given day.
The day to find the start delta relative to.
A number between 0 and 1 if the start of this span is in the 24-hour period starting at the given timestamp, otherwise the value returned may be less than 0 or greater than 1.
Summarizes this span given an approximate unit of time and a few other
options. If the start and end are on the same unit, a single value will
be returned. Otherwise a start and end will be returned with a delimiter
.
The unit of time this span is for.
When true
the weekday of the start and end are included.
When true
the short form of weekdays and months will be used.
When true
the year will be repeated on the start and end
timestamp even if they are the same year.
When true
the year will be hidden if it's the current
year.
The string to separate the start and end timestamps with.
The summary of this span.
Calculates the number of weeks between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Calculates the number of years between the start and end timestamp.
The operation to perform on the result.
Whether the result should always be positive.
The time between the start and end timestamp.
Generated using TypeDoc
A class for a range of time between two Day timestamps.