Skip to content

farzinfweb/ferz

Repository files navigation

Ferz

Ferz is a library for working with dates, times and 10 different calendars in JavaScript.

Table of contents

Installation

BEFORE YOU INSTALL: please read the prerequisites

To install and set up the library, run:

$ npm install -S ferz

Or if you prefer using Yarn:

$ yarn add --dev ferz

Usage

To get the current date, you can use the now as below:

DateTime.now()

to get the date in a specific calendar, you can pass it as an argument

DateTime.now('persian')

To format the date, call stringifyWith with the format you need, for example:

DateTime.now().stringifyWith('yyyy-MM-dd')

will give you 2022-02-02

Authors

See also the list of contributors who participated in this project.

License

MIT License © Farzin Farzanehnia