Socket
Socket
Sign inDemoInstall

calcdate

Package Overview
Dependencies
5
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

2

package.json
{
"name": "calcdate",
"version": "2.0.2",
"version": "2.0.3",
"description": "Evalate a date expression calc`now + 3 days`)!",

@@ -5,0 +5,0 @@ "main": "dist/datecalculator.js",

@@ -91,2 +91,21 @@ # Date Calculator

**Example**
```
// Imports
import { datefnsCalculator } from "calcdate"
import datefns from "datefns";
// Setup
const calculator = datefnsCalculator(datefns);
// Examples:
calculator`2009-12T12:34`;
calculator`P0002--10-15T10:+30:20`;
calculator`NOW + 7days`;
calculator`2009-12T12:00 - 2019-12T12:00`;
```
where calculator is your imported calculator and expression is what you want calculated. The following section outlines what is permitted in expressions.

@@ -347,3 +366,3 @@

luxonCalculator`${moment()} + ${moment.duration(2, 'seconds');}`
momentCalculator`${moment()} + ${moment.duration(2, 'seconds');}`
```

@@ -350,0 +369,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc