-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #171
Open
AmanSharma123456
wants to merge
1
commit into
commenthol:master
Choose a base branch
from
AmanSharma123456:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update README.md #171
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# date-holidays | ||
|
||
> world-wide holidays in gregorian calender | ||
> world-wide holidays in the gregorian calender | ||
|
||
[![NPM version](https://badge.fury.io/js/date-holidays.svg)](https://www.npmjs.com/package/date-holidays/) | ||
[![Build Status](https://secure.travis-ci.org/commenthol/date-holidays.svg?branch=master)](https://travis-ci.org/commenthol/date-holidays) | ||
|
||
This module provides dates of holidays for various countries, states and regions | ||
This module provides dates of holidays for various countries, states, and regions | ||
by type while considering the applicable timezone. | ||
|
||
The features are: | ||
|
||
- calculation of public, bank and observance holidays for different countries, | ||
- calculation of public, bank, and observance holidays for different countries, | ||
state, region, following ISO 3166-2 | ||
- consideration of timezones for holiday checks | ||
- consideration of start and end time dependent on timezone | ||
- consideration of start and end time dependent on the timezone | ||
- substitute days | ||
- multi-language support for all holiday names | ||
- setting of custom holidays | ||
- uses own grammar for calculation of days | ||
- support for islamic calendar from 1970 to 2080 (*islamic dates might not be | ||
- support for Islamic calendar from 1970 to 2080 (*islamic dates might not be | ||
correct as they are subject to the sighting of the moon*) | ||
- support for hebrew calendar from 1970 to 2100 | ||
- support for chinese calendar | ||
- support for Hebrew calendar from 1970 to 2100 | ||
- support for the Chinese calendar | ||
- for generation of iCal calendar check out [date-holidays-ical][] | ||
|
||
Happy holidays! | ||
|
@@ -527,26 +527,26 @@ a single holiday object which consists of: | |
### Dates | ||
|
||
The `date` String represents the start date of the holiday in ISO format without | ||
timezone. This string it intended for information only. | ||
timezone. This string is intended for information only. | ||
|
||
`start` and `end` are the start/end date of the holiday within the selected | ||
timezone of the country, state, region. | ||
the timezone of the country, state, region. | ||
|
||
### Name | ||
|
||
The `name` names the holiday in the local language of the selected country, | ||
state, region. The applied language(s) can be requested using `getLanguages()`. | ||
|
||
The language can be changed using the `setLanguages()` method. In case that not | ||
The language can be changed using the `set languages()` method. In case that not | ||
translation is available a fall-back to the next given language will be made. | ||
E.g. local language is "fr", `setLanguages('nl')` was called. For all holidays | ||
where no dutch translation is available the French version will be used instead. | ||
E.g. local language is "fr", `set languages('nl')` was called. For all holidays | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here...this should refer to the actual JavaScript method. |
||
where no Dutch translation is available the French version will be used instead. | ||
|
||
All holiday names should support an English translation. | ||
|
||
### Types of holidays | ||
|
||
Currently the following type with their meaning are supported | ||
Currently, the following type with their meaning are supported | ||
|
||
| type | meaning | | ||
| ----------- | ------------------------------------------ | | ||
|
@@ -556,7 +556,7 @@ Currently the following type with their meaning are supported | |
| optional | majority of people take a day off | | ||
| observance | optional festivity, no paid day off | | ||
|
||
Additionally a `note` field is sometimes available for further clarification. | ||
Additionally, a `note` field is sometimes available for further clarification. | ||
|
||
## API | ||
|
||
|
@@ -575,8 +575,8 @@ available grammar for holiday attribution is described in | |
## Custom builds of `holidays.json` | ||
|
||
If only selected countries are required in `data/holidays.json` you can add the | ||
following script to your npm scripts section. E.g. for picking just US, Canada, | ||
Mexico do the following: | ||
following script to your npm scripts section. E.g. for picking just the US, Canada, | ||
Mexico does the following: | ||
|
||
```js | ||
"scripts": { | ||
|
@@ -586,22 +586,22 @@ Mexico do the following: | |
|
||
The `--min` switch removes dependencies which are not required for the countries selected. You may not be able to use the full set of rules in case you want to add custom rules. | ||
|
||
Alternatively you may use the `--omit` option. | ||
Alternatively, you may use the `--omit` option. | ||
|
||
Manually use | ||
|
||
```bash | ||
npx holidays2json --pick US,CA,MX | ||
``` | ||
|
||
> **NOTE:** There are some countries which depend on data of others which | ||
> **NOTE:** There are some countries that depend on the data of others which | ||
> might render the file useless. e.g. "GU" requires "US", so try | ||
> to pick or omit both. | ||
|
||
## Bundling with webpack | ||
|
||
To minimize bundle sizes consider adding the following lines in your webpack config. | ||
Please take a look at `./webpack.config.js`. To further reduce size consider custom builds by only selecting required countries. | ||
Please take a look at `./webpack.config.js`. To further reduce size consider custom builds by only selecting the required countries. | ||
|
||
```js | ||
... | ||
|
@@ -660,14 +660,14 @@ You like to contribute please read [CONTRIBUTING.md][]. | |
If you contribute code to this project, you are implicitly allowing your | ||
code to be distributed under the ISC license. You are also implicitly | ||
verifying that all code is your original work or correctly attributed | ||
with the source of its origin and license. | ||
to the source of its origin and license. | ||
|
||
## License | ||
|
||
Copyright (c) 2016- commenthol ([ISC License](http://opensource.org/licenses/ISC)) | ||
|
||
The data contained in `holidays.json` and `./data/countries/*.yaml` is available under [CC BY-SA 3.0](http://creativecommons.org/licenses/by-sa/3.0/) | ||
as the majority of data obtained relies on wikipedia articles. The required | ||
as the majority of data obtained relies on Wikipedia articles. The required | ||
attribution can be found inside the files `./data/countries/*.yaml`. | ||
|
||
See [LICENSE][] for more information. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be changed as it is referring to an actual method and not an English string.