excludeofftime

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package excludeofftime implements the "exclude-off-time" transform primitive: it subtracts recurring daily off-hours windows (lunch breaks, end-of-day cutoffs, etc.) from every session's duration.

Off-hours windows come from State.Form["offHours"] when the run's form supplied one (round-tripped through JSON, since Form values are untyped any), falling back to the primitive's own params ({"offHours": [{"startMinute": .., "endMinute": ..}]}) otherwise.

All day-boundary math runs in time.UTC for determinism — the primitive has no notion of a user's local timezone, so the overlap computed for a given session is reproducible regardless of where the pipeline runs.

Index

Constants

View Source
const Name = "exclude-off-time"

Name is the primitive's registry key.

Variables

This section is empty.

Functions

func New

func New(params []byte) (transform.Primitive, error)

New builds an exclude-off-time primitive from its JSON params. params may be empty when the run's Form is expected to supply "offHours" instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL