1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
%D \module
%D [ file=t-interval-calendar.tex,
%D version=2023.04.15,
%D title=Date interval driven lists,
%D subtitle=User file for the interval calendar,
%D author=W. Egger,
%D date=\currentdate,
%D copyright=W. Egger,
%D license=Public Domain]
%D This module enables you to create lists which are based on date-intervals.
%D Dat intervals are given in days. There is no limit to the length of the
%D lists. The module creates tables based on variable sets. The number of
%D columns and the names of the header cells can freely be setup.
%D There are different predefined intervals which are contained in modes
%D Define the modes
% \enablemode[weekly]
\enablemode[twoweekly]
%\enablemode[monthly]
%D Load the module
\usemodule[intervalcalendar]
%D Choose the main language. This sets the interface. Supported
%D interfaces are EN,NL,DE
\mainlanguage[en]
%D Choose and setup the desired font
\setupbodyfont[ibmplex,rm,12pt]
%D Write setups for the table layout
\startsetups table:interval_check
\setupTABLE[split=repeat]
\setupTABLE[r][each][height=12mm,align=lohi]
\setupTABLE[r][1][style=bold,align={lohi,middle}]
\setupTABLE[c][1][width=0.2\textwidth]
\setupTABLE[c][2,3,4][width=0.15\textwidth]
\setupTABLE[c][5][width=0.3\textwidth]
\stopsetups
%D Define label texts for the column heads
\setuplabeltext[en][c1=Datum]
\setuplabeltext[en][c2=Gas]
\setuplabeltext[en][c3=Electricity]
\setuplabeltext[en][c4=Water]
\setuplabeltext[en][c5=Observation]
%D Build the document
\starttext
\startmode[weekly]
\Checklist{"2022-8-10"}{"2022-9-30"}{5}{7} % startdate,enddate,columns,interval
\stopmode
\startmode[twoweekly]
\Checklist{"2022/9/10"}{"2023/01/31"}{5}{14} % startdate,enddate,columns,interval
\stopmode
\startmode[monthly]
\Checklist{"2022/8/10"}{"2023/05/31"}{5}{30} % startdate,enddate,columns,interval
\stopmode
\stoptext
|