pike.hubbe.net

[Top]
Calendar
Calendar.TimeRange
previousCalendar.TimeRange()->contains() Calendar.TimeRange()->distance()next

Method Calendar.TimeRange()->create()


Method create

void Calendar.TimeRange()->create("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

void Calendar.TimeRange()->create(object(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 Calendar.TimeRange.set_timezone, Calendar.TimeRange.set_language or Calendar.TimeRange.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

void Calendar.TimeRange()->create("unix", int unixtime)
void Calendar.TimeRange()->create("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.


Extracted from Pike v7.3 release 11 at 2001-11-03.