digitransit-ui/digitransit-util/packages/digitransit-util-day-range-pattern
2024-02-08 16:19:51 +02:00
..
CHANGELOG.md Remove conventional commit check 2024-02-08 16:19:51 +02:00
index.js feat: new weekly schedule 2021-04-13 09:30:29 +03:00
LICENSE-AGPL.txt feat: initial version 2020-02-26 08:52:58 +02:00
LICENSE-EUPL.txt feat: initial version 2020-02-26 08:52:58 +02:00
package.json feat: new weekly schedule 2021-04-13 09:30:29 +03:00
README.md fix: typo and create-new-module 2020-02-27 14:53:50 +02:00
test.js chore: autofix linter errors 2024-01-08 14:15:33 +02:00

@digitransit-util/digitransit-util-day-range-pattern

dayRangePattern

Finds the range pattern converted from array of pattern's unique active dates.

Parameters

  • arrayOfDayNumbers Array Array of pattern's unique active dates as Day Of Week (ISO) (e.g. 5,6 = only Friday and Saturday)

Examples

digitransit-util.dayRangePattern([5,6,5,6,5,6]);
//='pe-la'

Returns string Range pattern


This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.

Installation

Install this module individually:

$ npm install @digitransit-util/digitransit-util-day-range-pattern

Or install the Digitransit-util module that includes it as a function:

$ npm install @digitransit-util/digitransit-util