digitransit-ui/digitransit-util/packages/digitransit-util-day-range-pattern
2021-04-13 09:30:29 +03:00
..
CHANGELOG.md docs: new CHANGELOG.md by lerna and conventionalCommits 2020-03-06 07:54:14 +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 style: autofix some lint errors 2020-09-17 13:46:26 +03: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