nepali-date-library 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nepali_date_library-1.0.0/PKG-INFO +65 -0
- nepali_date_library-1.0.0/ReadMe.md +43 -0
- nepali_date_library-1.0.0/pyproject.toml +60 -0
- nepali_date_library-1.0.0/setup.cfg +4 -0
- nepali_date_library-1.0.0/src/nepali_date_library/__init__.py +32 -0
- nepali_date_library-1.0.0/src/nepali_date_library/helper/constants.py +867 -0
- nepali_date_library-1.0.0/src/nepali_date_library/helper/date_converter.py +93 -0
- nepali_date_library-1.0.0/src/nepali_date_library/helper/date_formatter.py +401 -0
- nepali_date_library-1.0.0/src/nepali_date_library/nepali_date_library.py +1226 -0
- nepali_date_library-1.0.0/src/nepali_date_library.egg-info/PKG-INFO +65 -0
- nepali_date_library-1.0.0/src/nepali_date_library.egg-info/SOURCES.txt +13 -0
- nepali_date_library-1.0.0/src/nepali_date_library.egg-info/dependency_links.txt +1 -0
- nepali_date_library-1.0.0/src/nepali_date_library.egg-info/requires.txt +6 -0
- nepali_date_library-1.0.0/src/nepali_date_library.egg-info/top_level.txt +1 -0
- nepali_date_library-1.0.0/tests/test_nepali_date.py +18 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nepali-date-library
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A Nepali Date Library for Python (Bikram Sambat ↔ AD conversion and manipulation)
|
|
5
|
+
Author-email: Sandip Ghimire <sandipghimire2076@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://nepalidate.sandip-ghimire.com.np
|
|
8
|
+
Project-URL: Repository, https://github.com/SandipGhimire/nepali-date-library-python
|
|
9
|
+
Project-URL: Issues, https://github.com/SandipGhimire/nepali-date-library-python/issues
|
|
10
|
+
Keywords: nepali,nepal,nepali-date-library,nepali-calendar,nepali-date,bikram-sambat,bs-date,date-conversion,ad-to-bs,bs-to-ad
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
15
|
+
Requires-Python: >=3.8
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
19
|
+
Requires-Dist: black; extra == "dev"
|
|
20
|
+
Requires-Dist: flake8; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy; extra == "dev"
|
|
22
|
+
|
|
23
|
+
# NepaliDate Library (Python)
|
|
24
|
+
|
|
25
|
+
[](https://github.com/SandipGhimire/Nepali-Date-Library-Python/blob/master/LICENSE)
|
|
26
|
+
[](https://nepalidate.sandip-ghimire.com.np)
|
|
27
|
+
[](https://github.com/SandipGhimire/nepali-date-library-Python)
|
|
28
|
+
|
|
29
|
+
## Overview
|
|
30
|
+
|
|
31
|
+
The `NepaliDate` Python library provides a proper way to work with Nepali (Bikram Sambat) dates.
|
|
32
|
+
It allows you to create, manipulate, format, and convert between Nepali Bikram Sambat dates (1976/01/01 - 2100/12/31) and Gregorian dates (1919-03-13 - 2044-04-12). It also supports fiscal years, quarters, and extensive date operations.
|
|
33
|
+
|
|
34
|
+
This library is a Python port of the original TypeScript/JavaScript `NepaliDate` library.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 📚 Documentation
|
|
39
|
+
|
|
40
|
+
For detailed guides, API references, and examples, please visit the official Wiki:
|
|
41
|
+
|
|
42
|
+
👉 **[nepalidate.sandip-ghimire.com.np](https://nepalidate.sandip-ghimire.com.np)**
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install nepali-date-library
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
```py
|
|
55
|
+
from nepali_date_library import NepaliDate;
|
|
56
|
+
|
|
57
|
+
now = NepaliDate()
|
|
58
|
+
print(now.format("YYYY-MM-DD"))
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For more advanced usage, please refer to the [Wiki](https://nepalidate.sandip-ghimire.com.np).
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
[MIT](https://choosealicense.com/licenses/mit/)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# NepaliDate Library (Python)
|
|
2
|
+
|
|
3
|
+
[](https://github.com/SandipGhimire/Nepali-Date-Library-Python/blob/master/LICENSE)
|
|
4
|
+
[](https://nepalidate.sandip-ghimire.com.np)
|
|
5
|
+
[](https://github.com/SandipGhimire/nepali-date-library-Python)
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The `NepaliDate` Python library provides a proper way to work with Nepali (Bikram Sambat) dates.
|
|
10
|
+
It allows you to create, manipulate, format, and convert between Nepali Bikram Sambat dates (1976/01/01 - 2100/12/31) and Gregorian dates (1919-03-13 - 2044-04-12). It also supports fiscal years, quarters, and extensive date operations.
|
|
11
|
+
|
|
12
|
+
This library is a Python port of the original TypeScript/JavaScript `NepaliDate` library.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 📚 Documentation
|
|
17
|
+
|
|
18
|
+
For detailed guides, API references, and examples, please visit the official Wiki:
|
|
19
|
+
|
|
20
|
+
👉 **[nepalidate.sandip-ghimire.com.np](https://nepalidate.sandip-ghimire.com.np)**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install nepali-date-library
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
```py
|
|
33
|
+
from nepali_date_library import NepaliDate;
|
|
34
|
+
|
|
35
|
+
now = NepaliDate()
|
|
36
|
+
print(now.format("YYYY-MM-DD"))
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For more advanced usage, please refer to the [Wiki](https://nepalidate.sandip-ghimire.com.np).
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
[MIT](https://choosealicense.com/licenses/mit/)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "nepali-date-library"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "A Nepali Date Library for Python (Bikram Sambat ↔ AD conversion and manipulation)"
|
|
9
|
+
readme = "ReadMe.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
|
|
13
|
+
authors = [{ name = "Sandip Ghimire", email = "sandipghimire2076@gmail.com" }]
|
|
14
|
+
|
|
15
|
+
keywords = [
|
|
16
|
+
"nepali",
|
|
17
|
+
"nepal",
|
|
18
|
+
"nepali-date-library",
|
|
19
|
+
"nepali-calendar",
|
|
20
|
+
"nepali-date",
|
|
21
|
+
"bikram-sambat",
|
|
22
|
+
"bs-date",
|
|
23
|
+
"date-conversion",
|
|
24
|
+
"ad-to-bs",
|
|
25
|
+
"bs-to-ad",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
classifiers = [
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"License :: OSI Approved :: MIT License",
|
|
31
|
+
"Operating System :: OS Independent",
|
|
32
|
+
"Topic :: Software Development :: Libraries",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
dependencies = []
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Homepage = "https://nepalidate.sandip-ghimire.com.np"
|
|
39
|
+
Repository = "https://github.com/SandipGhimire/nepali-date-library-python"
|
|
40
|
+
Issues = "https://github.com/SandipGhimire/nepali-date-library-python/issues"
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
dev = ["pytest>=7.0", "black", "flake8", "mypy"]
|
|
44
|
+
|
|
45
|
+
[tool.setuptools]
|
|
46
|
+
package-dir = { "" = "src" }
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
where = ["src"]
|
|
50
|
+
|
|
51
|
+
[tool.pytest.ini_options]
|
|
52
|
+
testpaths = ["tests"]
|
|
53
|
+
|
|
54
|
+
[tool.black]
|
|
55
|
+
line-length = 88
|
|
56
|
+
target-version = ["py38"]
|
|
57
|
+
|
|
58
|
+
[tool.mypy]
|
|
59
|
+
python_version = "3.10"
|
|
60
|
+
strict = true
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from .nepali_date_library import NepaliDate
|
|
2
|
+
from .helper.constants import (
|
|
3
|
+
nepali_date_map,
|
|
4
|
+
week_en,
|
|
5
|
+
week_np,
|
|
6
|
+
week_short_en,
|
|
7
|
+
week_short_np,
|
|
8
|
+
month_en,
|
|
9
|
+
month_np,
|
|
10
|
+
month_short_en,
|
|
11
|
+
month_short_np,
|
|
12
|
+
number_np,
|
|
13
|
+
)
|
|
14
|
+
from .helper.date_converter import ADtoBS, BStoAD
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"NepaliDate",
|
|
18
|
+
"nepali_date_map",
|
|
19
|
+
"week_en",
|
|
20
|
+
"week_np",
|
|
21
|
+
"week_short_en",
|
|
22
|
+
"week_short_np",
|
|
23
|
+
"month_en",
|
|
24
|
+
"month_np",
|
|
25
|
+
"month_short_en",
|
|
26
|
+
"month_short_np",
|
|
27
|
+
"number_np",
|
|
28
|
+
"ADtoBS",
|
|
29
|
+
"BStoAD",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
__version__ = "0.0.1"
|