2.0.2 • Published 2 years ago

@matteobax/date-convalidator v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

date-convalidator

This tool allows you to check if a date is entered correctly

Usage

const convalidate = require('@matteobax/date-convalidator');
let date=''; // The date to check (separators - / . can be used)
let format = '' // The format of date (dd/mm/yyyy , yyyy/mm/dd , mm/dd/yyyy)
let check = convalidate.checkDate(date, format);
if(check==0){
    console.log('correct date');
}else if (check==-1){
    console.log('wrong date');
}

Installation

npm i @matteobax/date-convalidator
2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago