Provides utilities for advanced time handling including cron jobs, timestamps, intervals, and more.
Go to file
2020-09-07 23:44:08 +00:00
.vscode fix(core): update 2020-09-02 14:27:11 +00:00
test fix(core): update 2020-09-07 17:16:11 +00:00
ts fix(core): update 2020-09-07 23:44:07 +00:00
.gitignore fix(core): update 2020-05-25 21:49:35 +00:00
.gitlab-ci.yml fix(core): update 2020-09-02 14:27:11 +00:00
license fix(core): update 2020-05-27 16:59:26 +00:00
npmextra.json fix(core): update 2020-05-25 21:49:08 +00:00
package-lock.json 3.0.35 2020-09-07 23:44:08 +00:00
package.json 3.0.35 2020-09-07 23:44:08 +00:00
readme.md fix(core): update 2020-07-11 21:41:33 +00:00
tslint.json fix(core): update 2018-11-23 18:29:38 +01:00

@pushrocks/smarttime

handle time in smart ways

Status for master

Status Category Status Badge
GitLab Pipelines pipeline status
GitLab Pipline Test Coverage coverage report
npm npm downloads per month
Snyk Known Vulnerabilities
TypeScript Support TypeScript
node Support node
Code Style Code Style
PackagePhobia (total standalone install weight) PackagePhobia
PackagePhobia (package size on registry) PackagePhobia
BundlePhobia (total size when bundled) BundlePhobia
Platform support Supports Windows 10 Supports Mac OS X

Usage

Use TypeScript for best in class instellisense.

Smarttime offers smart ways to deal with time.

class CronManager

This class provides scheduling of functions with a cron syntax

import { CronManager } from '@pushrocks/smarrtime';
const cronManagerInstance = new CronManager();
cronManagerInstance.addConrjob('* * * * * *', async () => {
  console.log('hello'); // will log 'hello' to console once every second;
});
cronManagerInstance.start();

class ExtendedDate

This class offers static functions to create zone specific JavaScript dates from European formated time strings.

import { ExtendedDate } from '@pushrocks/smarttime'
const myDate: Date = ExtendedDate.fromEuropeanDate('8.6.2018')

Contribution

We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can contribute one time or contribute monthly. :)

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer