npdatetime 0.1.1__py3-none-any.whl

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.
@@ -0,0 +1,127 @@
1
+ Year,Baisakh,Jestha,Ashar,Shrawan,Bhadra,Asoj,Kartik,Mangsir,Poush,Magh,Falgun,Chait
2
+ 1975,31,31,32,32,31,30,30,29,30,29,30,30
3
+ 1976,31,32,31,32,31,30,30,30,29,29,30,31
4
+ 1977,30,32,31,32,31,30,30,30,29,30,29,31
5
+ 1978,31,31,32,31,31,31,30,29,30,29,30,30
6
+ 1979,31,31,32,32,31,30,30,29,30,29,30,30
7
+ 1980,31,32,31,32,31,30,30,30,29,29,30,31
8
+ 1981,31,31,31,32,31,31,29,30,30,29,30,30
9
+ 1982,31,31,32,31,31,31,30,29,30,29,30,30
10
+ 1983,31,31,32,32,31,30,30,29,30,29,30,30
11
+ 1984,31,32,31,32,31,30,30,30,29,29,30,31
12
+ 1985,31,31,31,32,31,31,29,30,30,29,30,30
13
+ 1986,31,31,32,31,31,31,30,29,30,29,30,30
14
+ 1987,31,32,31,32,31,30,30,29,30,29,30,30
15
+ 1988,31,32,31,32,31,30,30,30,29,29,30,31
16
+ 1989,31,31,31,32,31,31,29,30,30,29,30,30
17
+ 1990,31,31,32,31,31,31,30,29,30,29,30,30
18
+ 1991,31,32,31,32,31,30,30,30,29,29,30,30
19
+ 1992,31,32,31,32,31,30,30,30,29,30,29,31
20
+ 1993,31,31,32,31,31,31,30,29,30,29,30,30
21
+ 1994,31,31,32,31,31,31,30,29,30,29,30,30
22
+ 1995,31,32,31,32,31,30,30,30,29,29,30,30
23
+ 1996,31,32,31,32,31,30,30,30,29,30,29,31
24
+ 1997,31,31,32,31,31,31,30,29,30,29,30,30
25
+ 1998,31,31,32,31,31,31,30,29,30,29,30,30
26
+ 1999,31,32,31,32,31,30,30,30,29,29,30,31
27
+ 2000,30,32,31,32,31,30,30,30,29,30,29,31
28
+ 2001,31,31,32,31,31,31,30,29,30,29,30,30
29
+ 2002,31,31,32,32,31,30,30,29,30,29,30,30
30
+ 2003,31,32,31,32,31,30,30,30,29,29,30,31
31
+ 2004,30,32,31,32,31,30,30,30,29,30,29,31
32
+ 2005,31,31,32,31,31,31,30,29,30,29,30,30
33
+ 2006,31,31,32,32,31,30,30,29,30,29,30,30
34
+ 2007,31,32,31,32,31,30,30,30,29,29,30,31
35
+ 2008,31,31,31,32,31,31,29,30,30,29,29,31
36
+ 2009,31,31,32,31,31,31,30,29,30,29,30,30
37
+ 2010,31,31,32,32,31,30,30,29,30,29,30,30
38
+ 2011,31,32,31,32,31,30,30,30,29,29,30,31
39
+ 2012,31,31,31,32,31,31,29,30,30,29,30,30
40
+ 2013,31,31,32,31,31,31,30,29,30,29,30,30
41
+ 2014,31,31,32,32,31,30,30,29,30,29,30,30
42
+ 2015,31,32,31,32,31,30,30,30,29,29,30,31
43
+ 2016,31,31,31,32,31,31,29,30,30,29,30,30
44
+ 2017,31,31,32,31,31,31,30,29,30,29,30,30
45
+ 2018,31,32,31,32,31,30,30,29,30,29,30,30
46
+ 2019,31,32,31,32,31,30,30,30,29,30,29,31
47
+ 2020,31,31,31,32,31,31,30,29,30,29,30,30
48
+ 2021,31,31,32,31,31,31,30,29,30,29,30,30
49
+ 2022,31,32,31,32,31,30,30,30,29,29,30,30
50
+ 2023,31,32,31,32,31,30,30,30,29,30,29,31
51
+ 2024,31,31,31,32,31,31,30,29,30,29,30,30
52
+ 2025,31,31,32,31,31,31,30,29,30,29,30,30
53
+ 2026,31,32,31,32,31,30,30,30,29,29,30,31
54
+ 2027,30,32,31,32,31,30,30,30,29,30,29,31
55
+ 2028,31,31,32,31,31,31,30,29,30,29,30,30
56
+ 2029,31,31,32,31,32,30,30,29,30,29,30,30
57
+ 2030,31,32,31,32,31,30,30,30,29,29,30,31
58
+ 2031,30,32,31,32,31,30,30,30,29,30,29,31
59
+ 2032,31,31,32,31,31,31,30,29,30,29,30,30
60
+ 2033,31,31,32,32,31,30,30,29,30,29,30,30
61
+ 2034,31,32,31,32,31,30,30,30,29,29,30,31
62
+ 2035,30,32,31,32,31,31,29,30,30,29,29,31
63
+ 2036,31,31,32,31,31,31,30,29,30,29,30,30
64
+ 2037,31,31,32,32,31,30,30,29,30,29,30,30
65
+ 2038,31,32,31,32,31,30,30,30,29,29,30,31
66
+ 2039,31,31,31,32,31,31,29,30,30,29,30,30
67
+ 2040,31,31,32,31,31,31,30,29,30,29,30,30
68
+ 2041,31,31,32,32,31,30,30,29,30,29,30,30
69
+ 2042,31,32,31,32,31,30,30,30,29,29,30,31
70
+ 2043,31,31,31,32,31,31,29,30,30,29,30,30
71
+ 2044,31,31,32,31,31,31,30,29,30,29,30,30
72
+ 2045,31,32,31,32,31,30,30,29,30,29,30,30
73
+ 2046,31,32,31,32,31,30,30,30,29,29,30,31
74
+ 2047,31,31,31,32,31,31,30,29,30,29,30,30
75
+ 2048,31,31,32,31,31,31,30,29,30,29,30,30
76
+ 2049,31,32,31,32,31,30,30,30,29,29,30,30
77
+ 2050,31,32,31,32,31,30,30,30,29,30,29,31
78
+ 2051,31,31,31,32,31,31,30,29,30,29,30,30
79
+ 2052,31,31,32,31,31,31,30,29,30,29,30,30
80
+ 2053,31,32,31,32,31,30,30,30,29,29,30,30
81
+ 2054,31,32,31,32,31,30,30,30,29,30,29,31
82
+ 2055,31,31,32,31,31,31,30,29,30,29,30,30
83
+ 2056,31,31,32,31,32,30,30,29,30,29,30,30
84
+ 2057,31,32,31,32,31,30,30,30,29,29,30,31
85
+ 2058,30,32,31,32,31,30,30,30,29,30,29,31
86
+ 2059,31,31,32,31,31,31,30,29,30,29,30,30
87
+ 2060,31,31,32,32,31,30,30,29,30,29,30,30
88
+ 2061,31,32,31,32,31,30,30,30,29,29,30,31
89
+ 2062,31,31,31,32,31,31,29,30,29,30,29,31
90
+ 2063,31,31,32,31,31,31,30,29,30,29,30,30
91
+ 2064,31,31,32,32,31,30,30,29,30,29,30,30
92
+ 2065,31,32,31,32,31,30,30,30,29,29,30,31
93
+ 2066,31,31,31,32,31,31,29,30,30,29,29,31
94
+ 2067,31,31,32,31,31,31,30,29,30,29,30,30
95
+ 2068,31,31,32,32,31,30,30,29,30,29,30,30
96
+ 2069,31,32,31,32,31,30,30,30,29,29,30,31
97
+ 2070,31,31,31,32,31,31,29,30,30,29,30,30
98
+ 2071,31,31,32,31,31,31,30,29,30,29,30,30
99
+ 2072,31,32,31,32,31,30,30,29,30,29,30,30
100
+ 2073,31,32,31,32,31,30,30,30,29,29,30,31
101
+ 2074,31,31,31,32,31,31,30,29,30,29,30,30
102
+ 2075,31,31,32,31,31,31,30,29,30,29,30,30
103
+ 2076,31,32,31,32,31,30,30,30,29,29,30,30
104
+ 2077,31,32,31,32,31,30,30,30,29,30,29,31
105
+ 2078,31,31,31,32,31,31,30,29,30,29,30,30
106
+ 2079,31,31,32,31,31,31,30,29,30,29,30,30
107
+ 2080,31,32,31,32,31,30,30,30,29,29,30,30
108
+ 2081,31,32,31,32,31,30,30,30,29,30,29,31
109
+ 2082,31,31,32,31,31,30,30,30,29,30,30,30
110
+ 2083,31,31,32,31,31,30,30,30,29,30,30,30
111
+ 2084,31,31,32,31,31,30,30,30,29,30,30,30
112
+ 2085,31,32,31,32,30,31,30,30,29,30,30,30
113
+ 2086,30,32,31,32,31,30,30,30,29,30,30,30
114
+ 2087,31,31,32,31,31,31,30,29,30,30,30,30
115
+ 2088,30,31,32,32,30,31,30,30,29,30,30,30
116
+ 2089,30,32,31,32,31,30,30,30,29,30,30,30
117
+ 2090,30,32,31,32,31,30,30,30,29,30,30,30
118
+ 2091,31,31,32,31,31,31,30,30,29,30,30,30
119
+ 2092,30,31,32,32,31,30,30,30,29,30,30,30
120
+ 2093,30,32,31,32,31,30,30,30,29,30,30,30
121
+ 2094,31,31,32,31,31,30,30,30,29,30,30,30
122
+ 2095,31,31,32,31,31,31,30,29,30,30,30,30
123
+ 2096,30,31,32,32,31,30,30,29,30,29,30,30
124
+ 2097,31,32,31,32,31,30,30,30,29,30,30,30
125
+ 2098,31,31,32,31,31,31,29,30,29,30,29,31
126
+ 2099,31,31,32,31,31,31,30,29,29,30,30,30
127
+ 2100,31,32,31,32,30,31,30,29,30,29,30,30
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+ Copyright © 2020 AMRIT GIRI
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the “Software”), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in
12
+ all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
@@ -0,0 +1,180 @@
1
+ Metadata-Version: 2.1
2
+ Name: npdatetime
3
+ Version: 0.1.1
4
+ Summary: A Python package that provides advanced functionality for handling Nepali dates and times, including support for the Bikram Sambat calendar system and Nepal Time (NPT). Ideal for developers working with Nepali date-related applications, offering seamless conversion, manipulation, and formatting of dates and times in the Nepali calendar.
5
+ Home-page: https://github.com/4mritGiri/npdatetime
6
+ Author: Amrit Giri
7
+ Author-email: Amrit Giri <amritgiri02595@gmail.com>
8
+ License: The MIT License (MIT)
9
+ Copyright © 2020 AMRIT GIRI
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the “Software”), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in
19
+ all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+ THE SOFTWARE.
28
+ Project-URL: Homepage, https://github.com/4mritGiri/npdatetime#readme
29
+ Project-URL: Issues, https://github.com/4mritGiri/npdatetime/issues
30
+ Keywords: Nepali Date,Date Conversion,Datetime,Bikram Sambat,Bikram Samvat,nepali,B.S.,BS,bs,b.s,date,NpDateTime,datetime,time,timezone,nepal,bikram,sambat,samvat,nepali-date,nepali-datetime,nepal-time,npt,nepal-timezone,npdatetime,npdt
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Requires-Python: >=3.5
35
+ Description-Content-Type: text/markdown
36
+ License-File: LICENSE
37
+
38
+ # **Nepali Datetime (Bikram Sambat Date & Nepal Time)**
39
+
40
+ A Python library inspired by the core `datetime` module, designed for operations based on the **Bikram Sambat (B.S.)** calendar and **Nepal Time (NPT)** timezone (`UTC+05:45`).
41
+
42
+ ### **Key Features**
43
+ - Supports Bikram Sambat (B.S.) date operations.
44
+ - Handles Nepal Time (NPT) timezone.
45
+ - Compatible with Python 3.5+.
46
+ - Seamless integration with Python's native `datetime` functionalities.
47
+ - Support for date formatting with Nepali Unicode.
48
+
49
+ ---
50
+
51
+ ## **Installation**
52
+
53
+ Install the package using `pip`:
54
+
55
+ ```bash
56
+ pip install npdatetime
57
+ ```
58
+
59
+ ---
60
+
61
+ ## **Basic Usage**
62
+
63
+ Here's how you can use `npdatetime` alongside Python's `datetime`:
64
+
65
+ ### **Importing**
66
+ ```python
67
+ import datetime
68
+ import npdatetime
69
+ ```
70
+
71
+ ### **Getting Today's Date**
72
+ ```python
73
+ # Gregorian date
74
+ datetime.date.today()
75
+
76
+ # Bikram Sambat date
77
+ npdatetime.date.today()
78
+ ```
79
+
80
+ ### **Current Date and Time**
81
+ ```python
82
+ # Gregorian datetime
83
+ datetime.datetime.now()
84
+
85
+ # Bikram Sambat datetime
86
+ npdatetime.datetime.now()
87
+ ```
88
+
89
+ ### **Creating Date and Datetime Objects**
90
+ ```python
91
+ # Gregorian date
92
+ datetime.date(2020, 9, 4)
93
+
94
+ # Bikram Sambat date
95
+ npdatetime.date(2077, 5, 19)
96
+
97
+ # Gregorian datetime
98
+ datetime.datetime(2020, 9, 4, 8, 26, 10, 123456)
99
+
100
+ # Bikram Sambat datetime
101
+ npdatetime.datetime(2077, 5, 19, 8, 26, 10, 123456)
102
+ ```
103
+
104
+ ### **Date/Datetime Formatting**
105
+ ```python
106
+ # Formatting Bikram Sambat date
107
+ npdatetime.datetime(2077, 5, 19, 8, 26, 10, 123456).strftime("%d %B %Y")
108
+ # Output: 19 Bhadau 2077
109
+
110
+ # Formatting with Nepali Unicode
111
+ npdatetime.date(1977, 10, 25).strftime('%K-%n-%D (%k %N %G)')
112
+ # Output: १९७७-१०-२५ (७७ माघ आइतबार)
113
+ ```
114
+
115
+ ### **Parsing from String**
116
+ ```python
117
+ npdatetime.datetime.strptime('2077-09-12', '%Y-%m-%d')
118
+ # Output: npdatetime.datetime(2077, 9, 12, 0, 0)
119
+ ```
120
+
121
+ ### **Timedelta Operations**
122
+ ```python
123
+ # Adding days to a date
124
+ npdatetime.date(1990, 5, 10) + datetime.timedelta(days=350)
125
+ # Output: npdatetime.date(1991, 4, 26)
126
+
127
+ # Adding hours and minutes to a datetime
128
+ npdatetime.datetime(1990, 5, 10, 5, 10, 20) + datetime.timedelta(hours=3, minutes=15)
129
+ # Output: npdatetime.datetime(1990, 5, 10, 8, 25, 20)
130
+ ```
131
+
132
+ ### **Bikram Sambat <-> Gregorian Conversion**
133
+ ```python
134
+ # Convert Bikram Sambat to Gregorian
135
+ npdatetime.date(1999, 7, 25).to_datetime_date()
136
+ # Output: datetime.date(1942, 11, 10)
137
+
138
+ # Convert Gregorian to Bikram Sambat
139
+ npdatetime.date.from_datetime_date(datetime.date(1942, 11, 10))
140
+ # Output: npdatetime.date(1999, 7, 25)
141
+ ```
142
+
143
+ ### **Bikram Sambat Monthly Calendar**
144
+ ```python
145
+ npdatetime.date(2078, 1, 1).calendar()
146
+
147
+ # Output:
148
+ Baishakh 2078
149
+ Sun Mon Tue Wed Thu Fri Sat
150
+ 1 2 3 4
151
+ 5 6 7 8 9 10 11
152
+ 12 13 14 15 16 17 18
153
+ 19 20 21 22 23 24 25
154
+ 26 27 28 29 30 31
155
+ ```
156
+
157
+ ---
158
+
159
+ ## **Documentation**
160
+
161
+ Comprehensive usage and examples can be found in the [official documentation](https://4mritGiri.github.io/npdatetime/).
162
+
163
+ ---
164
+
165
+ ## **Contribution**
166
+
167
+ Contributions are highly encouraged!
168
+ Refer to the [CONTRIBUTING.md](https://github.com/4mritGiri/npdatetime/blob/master/CONTRIBUTING.md) guide for details on how to get started.
169
+
170
+ ---
171
+
172
+ ## **License**
173
+
174
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
175
+
176
+ ---
177
+
178
+ ## **Feedback & Support**
179
+
180
+ For feature requests, bugs, or feedback, please raise an issue on [GitHub](https://github.com/4mritGiri/npdatetime/issues).
@@ -0,0 +1,10 @@
1
+ npdatetime/__init__.py,sha256=4-arrqG1kVK_MBCikeD2gDWpTWsLwm7CRRe2rKzBubg,37958
2
+ npdatetime/__init__.pyi,sha256=JOPIVFiqz6eoxNpPGO9LETNLLf_YPJL5wnvmLN3eq9U,10106
3
+ npdatetime/_custom_strptime.py,sha256=sO1CkAJV_4Ahgr0cqJjc4HncihVt0S0KzoKIblDYZMw,12014
4
+ npdatetime/config.py,sha256=C-ozgMViZyhbIUtP1phZ-xshktPwdbsVssFUTYVP6Os,396
5
+ npdatetime/data/calendar_bs.csv,sha256=G9KWbb35Ietcz31K2E4R5J2a5rhQl0QJjw1TA_V4M8s,5250
6
+ npdatetime-0.1.1.dist-info/LICENSE,sha256=zVhPTICUPJU67BU1DoMb0SofU9Zo2uY1kV-jn2SqvfI,1082
7
+ npdatetime-0.1.1.dist-info/METADATA,sha256=2fMu2a40xjDDX-uTMTDeNNlHFqJCBU9XrHs1HovupGo,5828
8
+ npdatetime-0.1.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
+ npdatetime-0.1.1.dist-info/top_level.txt,sha256=2FR7RutVmSD6SL-iOwUcGrHd1XXgzaqUvAU78WGz_9g,11
10
+ npdatetime-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.6.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ npdatetime