Available on crate feature
calendar only.Expand description
Where things go: the weeks of a month, the lanes of bars across days and the side by side columns of overlapping entries in a day.
Structs§
- Bar
- An occurrence laid across a row of days.
- Block
- A timed occurrence in one day of the time grid.
- Fitted
- Bars cut down to the lanes there is room for.
- Grid
- The geometry of a time grid: day columns beside a gutter of hour labels, one row per hour.
Constants§
- BLOCK_
GAP - The space between neighbouring blocks.
- BLOCK_
GUTTER - The part of a day column blocks leave free on the right.
- DAY_
MINUTES - Minutes in a day on the time grid.
- MIN_
BLOCK_ MINUTES - The shortest a block is drawn, so a five minute entry can still be read and grabbed. Blocks also keep clear of each other by this much.
Functions§
- bars
- Lays
occurrencesacrossdays, which are consecutive dates. Longer bars go first so they stay in one piece near the top, and each bar takes the highest lane that is free for all its days. - blocks
- The timed occurrences on
dateas blocks. Entries that overlap share the width in columns; a run of entries that touch one another uses as many columns as its busiest moment needs. - fit
- Keeps the bars that fit in
laneslines overdaysdays. A day with more bars than lines gives its last line to a count of the rest, so a bar on that line is hidden if any of its days is that full. - instant_
at - The instant
minuteminutes intodate. - lane_
count - How many lanes
barsuse. - minute_
on - The minute of
datethatinstantfalls on: 0 when it is before the day andDAY_MINUTESwhen it is after. - month_
weeks - The weeks that cover the month of
date, four to six of them. - snap
minutesrounded to the neareststep, kept within the day.- week_of
- The seven dates of the week holding
date, starting onweek_start. - weekdays
- The seven weekdays in order, starting on
week_start.