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

node-red-contrib-dayjs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-dayjs

Wrapper of dayjs for Node-RED

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

node-red-contrib-dayjs

Under development

A simple Node-RED node which wrapps the JavaScript library Day.js, an alternative to Moment.js

Install

To install - either use the manage palette option in the editor, or change to your Node-RED user directory.

    cd ~/.node-red
    npm install node-red-contrib-dayjs

Usage

Input

Expect a parsable String:
'2018-04-04T16:00:00.000Z'
'2018-04-13 19:18:17.040+02:00'
'2018-04-13 19:18'
1318781876406
1318781876
If the Input i not parsable, the current time us used

Manipulate

Operations

Message Property: msg.operation

  • add
  • subtract
  • startOf
  • endOf
Units

Message Property: msg.unit

  • year
  • quarter
  • month
  • week
  • isoWeek
  • day
  • hour
  • minute
  • second
Amount

Message Property: msg.amount

Output

By default, the Output is an ISO String, but i can be changed.

You can also set a Costum Output Format (Format Options)

You can also change the Timezone (e.g. 'utc', 'Europe/Paris')

Example

Contributing

Acknowledgments

Keywords

FAQs

Package last updated on 02 Apr 2024

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