Socket
Socket
Sign inDemoInstall

jvidalv-easy-european-date

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jvidalv-easy-european-date

Generate european format date from a Date object.


Version published
Maintainers
1
Install size
6.38 kB
Created

Readme

Source

jvidalv-easy-european-date

Generate european format date from a Date object.

  1. Import jvidalv-easy-european-date package
  2. The function returns an string
  3. Function easyEurpeanDate requires a date Object as first parameter
  4. As a second paramter (Optional) you can customize separator between date and time, passing and object.
  5. This object accepts timeSeparator (string, defaults /), dateSeparator (stirng, defaults :) and showHoursAndMinutes (bool, defaults false)

Examples

var foo = require("jvidalv-easy-european-date")

// Example 1 without second parameter
var date = new Date()
console.log(foo(date))
// log -> 24/06/2019

// Example 2 with second parameter
var date = new Date()
console.log(foo(date, {dateSeparator: '-', timeSeparator: ':', showHoursAndMinutes : true}))
// log -> 24-06-2019 22:24

Check more utilities packages

  • https://www.npmjs.com/~jvidalv
  • https://www.npmjs.com/package/jvidalv-easy-european-date

Keywords

FAQs

Last updated on 24 Jun 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc