leap day properties and contributing section
This commit is contained in:
parent
bc695f8d91
commit
5c378edea0
37
README.md
37
README.md
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/PyryL/fixedcal/actions)
|
[](https://github.com/PyryL/fixedcal/actions)
|
||||||
[](https://codecov.io/gh/PyryL/fixedcal)
|
[](https://codecov.io/gh/PyryL/fixedcal)
|
||||||
|
[](LICENSE)
|
||||||
|
|
||||||
Python package for international fixed calendar dates.
|
Python package for international fixed calendar dates.
|
||||||
|
|
||||||
@ -13,6 +14,16 @@ Each month starts with Sunday and has exactly 28 days or 4 weeks.
|
|||||||
An additional _year day_ is added to the end of the year and it does not belong to any of the months and has no weekday.
|
An additional _year day_ is added to the end of the year and it does not belong to any of the months and has no weekday.
|
||||||
You can read more about IFC on [Wikipedia](https://en.wikipedia.org/wiki/International_Fixed_Calendar).
|
You can read more about IFC on [Wikipedia](https://en.wikipedia.org/wiki/International_Fixed_Calendar).
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
This package is available via PyPI:
|
||||||
|
|
||||||
|
```
|
||||||
|
pip install fixedcal
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also download the package directly from [releases](https://github.com/PyryL/fixedcal/releases).
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Date initialization
|
### Date initialization
|
||||||
@ -87,3 +98,29 @@ For that date, `FixedDate` gives the following property values.
|
|||||||
* `weekday` = None
|
* `weekday` = None
|
||||||
* `week_of_year` = 52
|
* `week_of_year` = 52
|
||||||
* `year_quarter` = 4
|
* `year_quarter` = 4
|
||||||
|
|
||||||
|
### Leap day
|
||||||
|
|
||||||
|
Leap day occurres on the same years as in Gregorian calendar. However, the placement of that day is different: after the last day of June and before the first day of Sol (17th June in Gregorian). The following properties are given by `FixedDate` for leap day:
|
||||||
|
|
||||||
|
* `day_of_year` = 169
|
||||||
|
* `day_of_month` = 29
|
||||||
|
* `month` = 6
|
||||||
|
* `is_leap_day` = True
|
||||||
|
* `is_leap_year` = True
|
||||||
|
* `week_of_month` = 4
|
||||||
|
* `weekday` = None
|
||||||
|
* `week_of_year` = 24
|
||||||
|
* `year_quarter` = 2
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Yes, you can contribute in the development of this package. If you find a bug or have a feature request, please file an [issue](https://github.com/PyryL/fixedcal/issues/new). You can also modify the code yourself and create a pull request.
|
||||||
|
|
||||||
|
You need [Poetry](https://python-poetry.org/) to manage the development environment. After downloading the source code of this package, run `poetry install` to install development dependencies and to set up a compatible Python environment.
|
||||||
|
|
||||||
|
Please check the following topics before creating a pull request:
|
||||||
|
|
||||||
|
* Your changes should not create new Pylint errors.
|
||||||
|
* There should be proper unit tests included in the pull request. This consists of high branch coverage (>90%) and quality of the tests. Working with dates has a lot of corner cases and tests are the best way to avoid bugs.
|
||||||
|
* The structure of the project should remain healthy: split the code between modules and packages.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user