Pike v8.0 release 1738

Method Calendar.TimeRanges.TimeRange()->create()


Method create

Calendar.TimeRanges.TimeRange Calendar.TimeRanges.TimeRange(TimeRange from)

Description

Create the timerange from another timerange.

This is useful when converting objects from one calendar to another. Note that the ruleset will be transferred to the new object, so this method can't be used to convert between timezones or languges - use set_timezone, set_language or set_ruleset to achieve this.

Note

The size of the new object may be inexact; a Month object can't comprehend seconds, for instance.


Method create

Calendar.TimeRanges.TimeRange Calendar.TimeRanges.TimeRange("julian", int|float julian_day)

Description

Create the timerange from a julian day, the standardized method of counting days. If the timerange is more then a day, it will at least enclose the day.


Method create

Calendar.TimeRanges.TimeRange Calendar.TimeRanges.TimeRange("unix", int unixtime)
Calendar.TimeRanges.TimeRange Calendar.TimeRanges.TimeRange("unix", int unixtime, int seconds_len)

Description

Create the timerange from unix time (as given by time(2)), with eventually the size of the time range in the same unit, seconds.