New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@magmacomputing/tempo-plugin-interval

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@magmacomputing/tempo-plugin-interval

Tempo community plugin providing Luxon-like Interval functionality for set-theory operations on time windows.

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Tempo Plugin

@magmacomputing/tempo-plugin-interval

This is a Community plugin for the Tempo library providing Luxon-like Interval functionality for set-theory operations on time windows.

Installation

npm install @magmacomputing/tempo-plugin-interval

Usage

import { Tempo } from '@magmacomputing/tempo';
import { IntervalPlugin } from '@magmacomputing/tempo-plugin-interval';

// Register the plugin
Tempo.extend(IntervalPlugin);

// Create an interval
const start = new Tempo('2024-01-01');
const end = new Tempo('2024-12-31');
const interval = Tempo.interval(start, end);

// Open-ended interval (start to the end of time!)
const openEnded = Tempo.interval(start);

// Set theory operations
interval.contains(new Tempo('2024-06-01')); // true
interval.overlaps(Tempo.interval('2024-11-01', '2025-02-01')); // true

Methods

  • contains(tempo: Tempo): boolean
  • overlaps(other: Interval): boolean
  • abuts(other: Interval): boolean
  • intersection(other: Interval): Interval | null
  • union(other: Interval): Interval | null

Licensing

This is a Community plugin. It is completely free and open-source for personal and commercial use. No license token is required.

For commercial licensing options, please contact Magma Computing Solutions.

Keywords

tempo

FAQs

Package last updated on 07 Jul 2026

Related posts