2.2 Linear time granularities
Discrete abstractions of time such as weeks, months or holidays can be thought of as “time granularities.” Time granularities are linear if they respect the linear progression of time. There have been several attempts to provide a framework for formally characterizing time granularities, including Bettini et al. (1998) which forms the basis of the work described here.
2.2.1 Definitions
The time domain is assumed to be discrete, and there is unique predecessor and successor for every element in the time domain except for the first and last.
This implies that the granules in a linear granularity are non-overlapping, continuous and ordered. The indexing for each granule can also be associated with a textual representation, called the label. A discrete time model often uses a fixed smallest linear granularity named by Bettini et al. (1998) bottom granularity. illustrates some common linear time granularities. Here, “hour” is the bottom granularity and “day,” “week,” “month” and “year” are linear granularities formed by mapping the index set to subsets of the hourly time domain. If we have “hour” running from \(\{0, 1, \dots,t\}\), we will have “day” running from \(\{0, 1, \dots, \lfloor t/24\rfloor\}\). These linear granularities are uni-directional and non-repeating.

Figure 2.1: Illustration of time domain, linear granularities and index set. Hour, day, week, month and year are linear granularities and can also be considered to be time domains. These are ordered with ordering guided by integers and hence are unidirectional and non-repeating. Hours could also be considered the index set, and a bottom granularity.
2.2.2 Relativities
Properties of pairs of granularities fall into various categories.
For example, both \(day \trianglelefteq week\) and \(day \preceq week\) hold, since every granule of \(week\) is the union of some set of granules of day and each day is a subset of a \(week\). These definitions are not equivalent. Consider another example, where \(G_1\) denotes “weekend” and \(H_1\) denotes “week.” Then, \(G_1 \preceq H_1\), but \(G_1 \ntrianglelefteq H_1\). Further, with \(G_2\) denoting “days” and \(H_2\) denoting “business-week,” \(G_2 \npreceq H_2\), but \(G_2 \trianglelefteq H_2\), since each business-week can be expressed as an union of some days, but Saturdays and Sundays are not subsets of any business-week. Moreover, with \(H_3\) denoting “public holidays,” \(G_1 \npreceq H_3\) and \(G_1 \ntrianglelefteq H_3\).
If \(G\) groups into \(H\), it would imply that any granule \(H(i)\) is the union of some granules of \(G\); for example, \(G(a_1), G(a_2), \dots, G(a_k)\). Condition (2) in Definition implies that if \(H(i + R) \neq \emptyset\), then \(H(i + R) = \bigcup (G(a_1 + P), G(a_2 + P), \dots, G(a_k + P))\), resulting in a “periodic” pattern of the composition of \(H\) using granules of \(G\). In this pattern, each granule of \(H\) is shifted by \(P\) granules of \(G\). \(P\) is called the (Bettini, Jajodia, and Wang (2000)).
For example, day is periodic with respect to week with \(R=1\) and \(P=7\), while (if we ignore leap years) day is periodic with respect to month with \(R=12\) and \(P=365\) as any month would consist of the same number of days across years. Since the idea of period involves a pair of granularities, we say that the pair \((day, week)\) has period 7, while the pair \((day, month)\) has a period 365 (ignoring leap years).
Granularities can also be periodic with respect to other granularities, “except for a finite number of spans of time where they behave in an anomalous way”; these are called quasi-periodic relationships (Bettini and De Sibi 2000). In a Gregorian calendar with leap years, day groups quasi-periodically into month with the exceptions of the time domain corresponding to \(29^{\text{th}}\) February of any year.
With two linear granularities \(G\) and \(H\), if \(G\) groups into or is finer than \(H\) then \(G\) is of lower order than \(H\). For example, if the bottom granularity is hour, then granularity \(day\) will have lower order than \(week\) since each day consists of fewer hours than each week.
Granules in any granularity may be aggregated to form a coarser granularity. A system of multiple granularities in lattice structures is referred to as a calendar by Dyreson et al. (2000). Linear time granularities are computed through “calendar algebra” operations (Ning, Wang, and Jajodia 2002) designed to generate new granularities recursively from the bottom granularity. For example, due to the constant length of day and week, we can derive them from hour using \[ D(j) = \lfloor H(i)/24\rfloor, \qquad W(k) = \lfloor H(i)/(24*7)\rfloor, \] where \(H\), \(D\) and \(W\) denote hours, days and weeks respectively.