convert-date-ts

This package will help you to convert the date which you are passing into timestamp

Usage no npm install needed!

<script type="module">
  import convertDateTs from 'https://cdn.skypack.dev/convert-date-ts';
</script>

README

A lightweight Javascript library to convert date to timestamp.

Installation

To install this library, use npm:

npm install convert-date-ts

Features

This package will allow you to convert date which you have passed into timestamp

How to Use

EX.

  1. var convertDateTs = require("convert-date-ts")

    console.log(convertDateTs(someDate))

    // it will return the timestamp of the date which you have passed

  2. var convertDateTs = require("convert-date-ts")

    console.log(convertDateTs())

    // it will return the timestamp of the current date hence you are not passing any specific date