chronon_format: Default formatting strings for chronons

chronon_format_linearR Documentation

Default formatting strings for chronons

Description

Provides default linear time formatting strings for a given chronon (finest time granule). The format strings use placeholders like {lin(year(1L))}, ⁠{cyc(month(1L), year(1L)}⁠ and ⁠{cyc(day(1L), month(1L)}⁠, which are evaluated in the context of the data's time_calendar().

Usage

chronon_format_linear(x, cal = time_calendar(x), ...)

chronon_format_cyclical(x, y, ...)

chronon_format_duration(x, ...)

Arguments

x

A time granule for the chronon.

cal

The calendar of the chronon, used to disambiguate suitable format strings for time units that are shared across calendars (e.g. cal_gregorian$day and cal_isoweek$day).

...

Additional arguments for methods.

y

A time granule for the cycle

Value

A character string containing the default format template for the chronon.

Examples

chronon_format_linear(cal_gregorian$year(1L))
chronon_format_linear(cal_gregorian$month(1L))
chronon_format_linear(cal_gregorian$day(1L))
chronon_format_linear(cal_isoweek$day(1L))

chronon_format_cyclical(cal_gregorian$month(1L), cal_gregorian$year(1L))
chronon_format_cyclical(cal_gregorian$day(1L), cal_gregorian$month(1L))
chronon_format_cyclical(cal_isoweek$day(1L), cal_isoweek$week(1L))
chronon_format_cyclical(cal_isoweek$week(1L), cal_isoweek$year(1L))

chronon_format_duration(cal_gregorian$year(1L))
chronon_format_duration(cal_gregorian$month(1L))
chronon_format_duration(cal_gregorian$day(1L))


mixtime documentation built on Nov. 18, 2026, 5:08 p.m.