Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chatopera/datemath

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chatopera/datemath

elasticsearch datemath parser, used in kibana

  • 4.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

datemath

datemath parser.

Usage

npm install @chatopera/datemath

usage:

const {parse} = require("@chatopera/datemath")
let now = parse("now")
// now is moment date object.

cli: timestamp STR [TIMEZONE]

For example: timestamp now Asia/Shanghai

Learn more about date math syntax

https://stackoverflow.com/questions/27152490/elasticsearch-date-range-get-yesterday

https://www.elastic.co/guide/en/elasticsearch/reference/6.5/common-options.html#date-math

Other tools:

Convert timestamp, https://www.unixtimestamp.com/index.php

Get world timezone map, https://momentjs.com/timezone/

Borrow code from

Deprecated: This library is deprecated in favour of https://github.com/elastic/kibana/tree/master/packages/elastic-datemath. See https://github.com/elastic/kibana/tree/master/packages for details on how to use Kibana specific packages.

Datemath string parser used in Kibana

License

Copyright (2018-2020) 北京华夏春松科技有限公司

Apache License Version 2.0

chatoper banner

FAQs

Package last updated on 16 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc