Skip to contents

Linear Time Representations

Functions to create and work with linear time representations

linear_time()
Linear time representation

Gregorian Calendar

Common linear time representations in the Gregorian calendar system.

year() yearquarter() yearmonth()
Gregorian continuous time representations

ISO 8601 Calendar

Common linear time representations in the ISO 8601 week date system.

yearweek()
ISO 8601 year-week time representation

Cyclical Time Representations

Functions to create and work with cyclical time representations

cyclical_time()
Cyclical time representation

Cyclical Gregorian Time

Cyclical time representations in the Gregorian calendar system.

month_of_year() day_of_year() day_of_month()
Gregorian cyclical time representations

Cyclical ISO 8601 Time

Cyclical time representations in the ISO 8601 week date system.

day_of_week() week_of_year()
ISO 8601 day of week

Calendar Systems

Calendar systems are composed of their associated time units. These define how time is divided and measured in different calendar systems.

Gregorian Calendar System

The standard civil calendar system with years, quarters, months, days, and sub-day units.

ISO 8601 Calendar System

The ISO 8601 week date calendar system with ISO years and weeks.

tu_isoyear() tu_week()
ISO 8601 time unit classes

Extensibility methods

These low-level functions define the relationships and labels between time units. Adding S7 methods for them allow the creation of custom time units and calendars.

chronon_cardinality() chronon_cardinality.S7_methods()
Cardinality between time units
chronon_convert() chronon_convert.S7_methods()
Convert between chronons
chronon_divmod() chronon_divmod.S7_methods()
Convert between chronons of different time units
chronon_common()
Find a common chronon from a set of chronons
mt_unit()
Base S7 class for creating new time units
time_chronon()
Obtain the chronon of a time object
time_unit_full() time_unit_abbr()
Time units as a string
cyclical_labels() cyclical_labels.S7_methods()
Friendly labels for cyclical relationships
mixtime_valid()
Check if times can be used within mixtime

Mixtime Objects

Functions for creating and working with mixtime objects that can contain multiple time granularities.

new_mixtime()
Create a new mixtime
as_mixtime()
Convert time class into a mixtime
is_mixtime()
Check if the object is a mixtime

Time Manipulation

Functions for manipulating and transforming time objects.

round_time() ceiling_time() floor_time()
Round, floor and ceiling transformations for time objects