JSPM

nrship

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q16804F
  • License MIT

Delivery/pickup date helpers for Germany (weekends + union of major state holidays)

Package Exports

  • nrship

Readme

NRShip

Delivery/pickup date helpers for Germany (weekends + union of major state holidays).

Install

npm install nrship
# or
pnpm add nrship
# or
yarn add nrship

Usage

Node (CommonJS)

const { pickupAnchoredShipmentDates, deliveryAnchoredShipmentDates } = require('nrship');

console.log(pickupAnchoredShipmentDates('2025-08-21'));
// => { pickupDate: '2025-08-21', deliveryDate: '2025-08-22' }

ESM

import { pickupAnchoredShipmentDates, deliveryAnchoredShipmentDates } from 'nrship';

Browser (UMD)

<script src="https://unpkg.com/nrship"></script>
<script>
  const { pickupAnchoredShipmentDates } = NRShip;
  console.log(pickupAnchoredShipmentDates('2025-08-21'));
</script>

API

  • pickupAnchoredShipmentDates(requestedPickupDate: string|Date)
    • Returns the same day if it’s a working day, otherwise the next working day; delivery is the next working day after pickup.
  • deliveryAnchoredShipmentDates(requestedDeliveryDate: string|Date)
    • Returns the same day if it’s a working day, otherwise the next working day; pickup is the previous working day before delivery.

Working days exclude weekends and a union of major German federal-state holidays.

License

MIT