New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

date-extractor

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-extractor

text to date extractor in arabic and english

latest
Source
npmnpm
Version
1.3.4
Version published
Weekly downloads
0
-100%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

Date

FAQs

Package last updated on 09 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts