1.3.3 • Published 10 days ago

date-extractor v1.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
10 days ago

Date Parser Package

Description

This package provides functionality to parse and manipulate dates in various formats, including relative dates and user prompts.

Installation

You can install the package via npm:

npm install date-parser-package

Usage

Importing the Package

import DateParser, { DateTime } from "date-parser-package";

Date Parsing

const dateParser = new DateParser("بعد 3 ايام");
const date = await dateParser.execute();
console.log(date);

DateTime Object

The DateTime object returned by the DateParser class has the following properties:

  • date: String representation of the date.
  • year: Year of the date.
  • quarter: Quarter of the year.
  • month: Month of the year.
  • week: Week number of the year.
  • day: Day of the month.
  • hour: Hour of the day.
  • prev_month_year: Year of the previous month.
  • prev_quarter_year: Year of the previous quarter.
  • prev_month: Month of the previous month.
  • curr_day: Current day of the month.
  • curr_quarter: Current quarter of the year.
  • last_date: Last date of the year.
  • day_date: Date in the format DD/MM/YYYY.
  • days_of_year: Days passed in the current year.
  • prev_quarter: Previous quarter of the year.
  • last_year_date: Last year's date.
  • prev_year: Previous year.
  • month_name_ar: Month name in Arabic.
  • month_name_en: Month name in English.
  • api: Indicates if the date was obtained from an API.
  • contains_date: Indicates if the result contains a valid date.

Dependencies

  • axios
  • similarity

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

1.3.3

10 days ago

1.3.2

10 days ago

1.3.1

5 months ago

1.3.0

6 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.6

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.0

9 months ago