Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 5, 2024 via pnpm

fecha 4.2.3

Date formatting and parsing
Package summary
Share
0
issues
1
license
1
MIT
Package created
10 Jan 2015
Version published
15 Apr 2022
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
fecha@4.2.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of fecha 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does fecha do?

Fecha is a lightweight JavaScript package, offering robust date formatting and parsing functionalities. With a small size of only 2.1KBs, it is specifically designed to provide an efficient alternative to the parsing and formatting features found in moment.js. This versatile utility improves code efficiency without sacrificing the precision of date formatting and parsing processes.

How do you use fecha?

Using fecha in your code is a straightforward process. First, ensure it's correctly installed into your project using either npm or Yarn:

For npm, use:

npm install fecha --save

For Yarn, use:

yarn add fecha

After successful installation, you can import the format and parse methods from the 'fecha' package as follows:

import { format, parse } from 'fecha';

To format dates, use the format method, which accepts a Date object, string format, and optionally i18n settings, and returns a formatted string:

format(new Date(2015, 10, 20), 'dddd MMMM Do, YYYY'); // Outputs 'Friday November 20th, 2015'

To parse dates, use the parse method, which accepts a date string and format, and optionally i18n settings, and returns a Date object:

parse('February 3rd, 2014', 'MMMM Do, YYYY'); // Returns new Date(2014, 1, 3)

For information about the available formatting tokens you can use, refer to the package's documentation.

Remember, for custom date formatting and parsing, always use the appropriate date format string that corresponds with your desired date output or the format of the input string you are parsing.

Where are the fecha docs?

To learn more about fecha and its usage, access its documentation right within the repository on GitHub (git+https://taylorhakes@github.com/taylorhakes/fecha.git). This repository includes more detailed information about its API, the available methods and their parameters, examples of usage, and the list of date format tokens supported for custom date formatting and parsing operations. Always ensure you consult this documentation to get accurate and updated information when working with fecha.