1.1.2 • Published 5 years ago

@bolzak/dateformatter v1.1.2

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

DateFormatter

Simple dateformatter in JavaScript that is available via NPM


Build Status and Other Information

Build Status


Purpose

This project is for 2 purposes: 1. to learn how to make node modules 2. to learn how to use travis

If this get's anywhere then hey, even better!


Example Usage

const formatter = require("@bolzak/dateformatter");

console.log(formatter.getDate("DD/MM/YYYY"));
console.log(formatter.getTime("HH:MIN:SS"))
console.log(formatter.getDateTime("YYYY/MM/DD HH:MIN"));

Accepted queries

Dates can be in the form of:

  • DD/MM/YYYY
  • MM/DD/YYYY
  • YYYY/MM/DD

Note: The symbols dividing the parts of the date can be any symbol, not necessarily a slash

Times can be in the form of:

  • HH:MIN:SS
  • HH:MIN

Note: As with dates, the symbols dividing the parts of the date can be any symbol, not necessarily a colon

DateTime strings can be any combination of valid date and time strings, however, the date portion must be first!