jvidalv-easy-european-date

1.0.2 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i jvidalv-easy-european-date

      Weekly Downloads

      5

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      6.53 kB

      Total Files

      5

      Last publish

      Collaborators

      • jvidalv