mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-07 02:30:36 +02:00
48 lines
1.4 KiB
Markdown
48 lines
1.4 KiB
Markdown
# @digitransit-util/digitransit-util-day-range-pattern
|
|
|
|
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
|
|
## dayRangePattern
|
|
|
|
Finds the range pattern converted from array of pattern's unique active dates.
|
|
|
|
### Parameters
|
|
|
|
- `arrayOfDayNumbers` **[Array][1]** Array of pattern's unique active dates as Day Of Week (ISO) (e.g. 5,6 = only Friday and Saturday)
|
|
|
|
### Examples
|
|
|
|
```javascript
|
|
digitransit-util.dayRangePattern([5,6,5,6,5,6]);
|
|
//='pe-la'
|
|
```
|
|
|
|
Returns **[string][2]** Range pattern
|
|
|
|
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
|
|
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
|
|
<!-- This file is automatically generated. Please don't edit it directly:
|
|
if you find an error, edit the source file (likely index.js), and re-run
|
|
./scripts/generate-readmes in the digitransit-util project. -->
|
|
|
|
---
|
|
|
|
This module is part of the Digitransit-ui project. It is maintained in the
|
|
[HSLdevcom/digitransit-ui](https://github.com/HSLdevcom/digitransit-ui) repository, where you can create
|
|
PRs and issues.
|
|
|
|
### Installation
|
|
|
|
Install this module individually:
|
|
|
|
```sh
|
|
$ npm install @digitransit-util/digitransit-util-day-range-pattern
|
|
```
|
|
|
|
Or install the Digitransit-util module that includes it as a function:
|
|
|
|
```sh
|
|
$ npm install @digitransit-util/digitransit-util
|
|
```
|