q2rad 0.1.227__tar.gz → 0.1.228__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.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- {q2rad-0.1.227 → q2rad-0.1.228}/PKG-INFO +1 -1
- {q2rad-0.1.227 → q2rad-0.1.228}/pyproject.toml +1 -1
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2raddb.py +20 -8
- q2rad-0.1.228/q2rad/version.py +1 -0
- q2rad-0.1.227/q2rad/version.py +0 -1
- {q2rad-0.1.227 → q2rad-0.1.228}/LICENSE +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/README.md +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/__init__.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/__main__.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2actions.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2appmanager.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2appselector.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2constants.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2extensions.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2forms.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2lines.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2make.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2market.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2modules.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2packages.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2queries.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2rad.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2reports.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2stylesettings.py +0 -0
- {q2rad-0.1.227 → q2rad-0.1.228}/q2rad/q2utils.py +0 -0
|
@@ -179,23 +179,35 @@ def ensure_empty_pk(table="", row={}, q2_db=None):
|
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
def dtoc(date, format_from="%Y-%m-%d", format_to="%d.%m.%Y"):
|
|
182
|
-
|
|
182
|
+
try:
|
|
183
|
+
return datetime.datetime.strptime(date, format_from).strftime(format_to)
|
|
184
|
+
except Exception:
|
|
185
|
+
return ""
|
|
183
186
|
|
|
184
187
|
|
|
185
188
|
def ctod(date, format_from="%d.%m.%Y", format_to="%Y-%m-%d"):
|
|
186
|
-
|
|
189
|
+
try:
|
|
190
|
+
return dtoc(date, format_from, format_to)
|
|
191
|
+
except Exception:
|
|
192
|
+
return ""
|
|
187
193
|
|
|
188
194
|
|
|
189
195
|
def first_day_of_month(date):
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
196
|
+
try:
|
|
197
|
+
_date = datetime.datetime.strptime(date, "%Y-%m-%d")
|
|
198
|
+
_date = _date.replace(day=1)
|
|
199
|
+
return _date.strftime("%Y-%m-%d")
|
|
200
|
+
except Exception:
|
|
201
|
+
return date
|
|
193
202
|
|
|
194
203
|
|
|
195
204
|
def last_day_of_month(date):
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
205
|
+
try:
|
|
206
|
+
_date = datetime.datetime.strptime(date, "%Y-%m-%d")
|
|
207
|
+
_date = _date.replace(day=calendar.monthrange(_date.year, _date.month)[1])
|
|
208
|
+
return _date.strftime("%Y-%m-%d")
|
|
209
|
+
except Exception:
|
|
210
|
+
return date
|
|
199
211
|
|
|
200
212
|
|
|
201
213
|
def ffinder(module_name="module", function_name="fname"):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.228"
|
q2rad-0.1.227/q2rad/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.227"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|