0.0.1 • Published 4 months ago

dayjs-feiertage v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

dayjs-feiertage

This is a wrapperlib for feiertage.js for dayjs to access German feiertage easily.

Installation

  • yarn: yarn add dayjs-feiertage
  • npm: npm install dayjs-feiertage

Quick Examples

ES Modules (Typescript/Javasript)

import dayjs from 'dayjs';
import dayjsFeiertage from './src/dayjs-feiertage';

dayjs.extend(dayjsFeiertage);

dayjs('2020-12-25').isHoliday('BUND') // true

// check if a day is a specific holiday
dayjs('2020-12-25').isSpecificHoliday( 'CHRISTIHIMMELFAHRT', 'ALL'); //false

 dayjs('2020-12-25').getHolidaysOfYear( 'ALL'); // returns list of Holiday, see next nty

One entry of the array contains:

[{
    name: 'CHRISTIHIMMELFAHRT',
    date: new Date('2023-05-17T22:00:00.000Z'),
    dateString: '2023-05-18',
    regions: [
      'BW',  'BY',   'BE',
      'BB',  'HB',   'HE',
      'HH',  'MV',   'NI',
      'NW',  'RP',   'SL',
      'SN',  'ST',   'SH',
      'TH',  'BUND', 'AUGSBURG',
      'ALL'
    ],
    translate: [Function: translate],
    getNormalizedDate: [Function: getNormalizedDate],
    equals: [Function: equals]
  }
]

API doc

The full API doc can be found here.

Feedback and Questions

You have two options two give feedback or ask questions:

  • Comment the official release post
  • Open issues or pullrequests on github

Contributors

Thank you for contributing:

  • thetric
  • SteveOswald

Feedback

If you have any questions, feel free to open an issue.

0.0.1

4 months ago