knify 1.8.35__tar.gz → 1.8.37__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {knify-1.8.35 → knify-1.8.37}/PKG-INFO +1 -1
- {knify-1.8.35 → knify-1.8.37}/knify/dateutil.py +5 -5
- {knify-1.8.35 → knify-1.8.37}/knify/help.py +1 -1
- {knify-1.8.35 → knify-1.8.37}/knify.egg-info/PKG-INFO +1 -1
- {knify-1.8.35 → knify-1.8.37}/LICENSE +0 -0
- {knify-1.8.35 → knify-1.8.37}/README.md +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify/__init__.py +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify/listutil.py +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify/logger.py +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify/threadutil.py +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify/warnutil.py +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify.egg-info/SOURCES.txt +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify.egg-info/dependency_links.txt +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify.egg-info/requires.txt +0 -0
- {knify-1.8.35 → knify-1.8.37}/knify.egg-info/top_level.txt +0 -0
- {knify-1.8.35 → knify-1.8.37}/setup.cfg +0 -0
- {knify-1.8.35 → knify-1.8.37}/setup.py +0 -0
@@ -4,17 +4,17 @@
|
|
4
4
|
import datetime
|
5
5
|
import time
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
FORMAT_YYMMDD = "%Y-%m-%d"
|
8
|
+
FORMAT_HMS = "%H:%M:%S"
|
9
|
+
FORMAT_YYMMDDHMS = "%Y-%m-%d %H:%M:%S"
|
10
|
+
FORMAT_YYMMDDHMSF = "%Y-%m-%d %H:%M:%S.%f"
|
11
11
|
|
12
12
|
|
13
13
|
def now() -> datetime:
|
14
14
|
return datetime.datetime.now()
|
15
15
|
|
16
16
|
|
17
|
-
def date_to_str(date_obj: datetime, format: str =
|
17
|
+
def date_to_str(date_obj: datetime, format: str = FORMAT_YYMMDDHMS) -> str:
|
18
18
|
if type(date_obj) == datetime.timedelta:
|
19
19
|
return (datetime.datetime(1970, 1, 1) + date_obj).strftime(format)
|
20
20
|
return date_obj.strftime(format)
|
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
|