1.0.2 • Published 5 years ago

jvidalv-easy-european-date v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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