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