@flowcore/time-bucket
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Build

Time Bucket

A Time Bucket utility library for facilitating working with flowcore time buckets

Configured Time

To get a configured time bucket key for a given time, use the GetTimeBucketKey function:

import { TimeBucket } from '@flowcore/time-bucket';

const pattern = "YYYYMMDDHHmmss";

const timeBucket = TimeBucket.create("YYYYMMDD", pattern);

const timeBucketKey = timeBucket(days()).format(pattern);

to get the configured time bucket increment for a given time pattern, use the GetTimeBucketKey function:

import { TimeBucket } from '@flowcore/time-bucket';

const pattern = "YYYYMMDDHHmmss";

const timeBucketIncrement = TimeBucket.GetTimeBucketKey("YYYYMMDD", pattern).stripFrom;

Installation

install with npm:

npm install @flowcore/time-bucket

or yarn:

yarn add @flowcore/time-bucket

Usage

Development

yarn install

or with npm:

npm install

/@flowcore/time-bucket/

    Package Sidebar

    Install

    npm i @flowcore/time-bucket

    Weekly Downloads

    29

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    40.7 kB

    Total Files

    19

    Last publish

    Collaborators

    • suuunly
    • jbiskur