1.0.3 • Published 8 months ago

format-date-package v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Date Formatter

A simple and lightweight npm package for formatting JavaScript and TypeScript Date objects into the yyyy-mm-dd format.

Features

  • Supports both JavaScript and TypeScript.
  • Simple API to format Date objects.
  • Lightweight with minimal dependencies.

Installation

You can install the package via npm:

npm install format-date-package


## Usage

### JavaScript Example

In a JavaScript file, you can import and use the formatDate function like this:

const { formatDate } = require('format-date-package');

const date = new Date();
const formattedDate = formatDate(date);

console.log(formattedDate);  // Example Output: "2024-11-12"


### TypeScript Example

In TypeScript, the usage is similar, and you'll benefit from type safety:

import { formatDate } from 'format-date-package';

const date = new Date();
const formattedDate = formatDate(date);

console.log(formattedDate);  // Example Output: "2024-11-12"


## Contact

Author: Abhijith
Email: abhijithj331@gmail.com
1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago