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

@magmacomputing/tempo-plugin-sla

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-sla

Tempo plugin that calculates exact working hours between dates, factoring in weekends and localized public holidays

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Tempo Plugin

@magmacomputing/tempo-plugin-sla

A Community plugin for the Tempo library that brings precise Service Level Agreement (SLA) calculations and Business Hour tracking to your application.

Usage

The SLA plugin subtracts weekends and public holidays from date-time math to give you the exact number of active business hours between two temporal points.

import { Tempo } from '@magmacomputing/tempo';
import { SLAPlugin } from '@magmacomputing/tempo-plugin-sla';

// Register the plugin (requires a valid license token)
Tempo.init({ 
  plugins: [SLAPlugin()] 
});

const t = new Tempo('2026-06-01T10:00:00Z');

// Calculates the exact number of working hours until the deadline
const remainingHours = t.workingHoursUntil('2026-06-05T15:00:00Z');

Remote Holidays (Enterprise Feature)

Maintaining local public holidays is complex. The SLA plugin can connect securely to the Magma Computing Holiday API to asynchronously fetch and cache holidays for a given region and year.

Once preloaded, all synchronous Tempo calls instantly utilize the cached schedule!

// During server startup or app initialization:
await SLAPlugin.preloadHolidays('AU-NSW', 2026);

// Later in your business logic:
Tempo.extend(SLAPlugin({ region: 'AU-NSW' }));
const t = new Tempo();
const hours = t.workingHoursUntil(deadline); // Automatically skips AU-NSW holidays!

Licensing

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

FAQs

Package last updated on 07 Jul 2026

Related posts