kisa-utils 0.42.6__py3-none-any.whl → 0.42.7__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.
kisa_utils/dates.py CHANGED
@@ -396,14 +396,17 @@ def endOfCurrentMonth() -> str:
396
396
  year, month, day = dateToday.split('-')
397
397
  return endOfMonth(year, month)
398
398
 
399
- def dateIsValid(date:str) -> bool:
399
+ def dateIsValid(date:str, dateFormat:str='YYYY-MM-DD') -> bool:
400
400
  '''
401
- check if a date is valid in the format 'YYYY-MM-DD'
401
+ check if a date is valid in the provided format
402
402
  Args:
403
403
  date(str): the date to check
404
+ dateFormat(str): the date format for which to check the date. common formats are;
405
+ - 'YYYY-MM-DD'
406
+ - 'YYYY-MM-DD HH:MM:SS'
404
407
  '''
405
408
  try:
406
- standardizedDate(date, 'YYYY-MM-DD')
409
+ standardizedDate(date, dateFormat)
407
410
  except:
408
411
  return False
409
412
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kisa-utils
3
- Version: 0.42.6
3
+ Version: 0.42.7
4
4
  Summary: Utility functions and modules for KISA Developers
5
5
  Author: Tom Bukenya
6
6
  Author-email: glayn2bukman@gmail.com
@@ -3,7 +3,7 @@ kisa_utils/cache.py,sha256=WOL3e0wvoyESXTtlbVnUg9TYUoLzg64sLP9J4b4ti9k,7377
3
3
  kisa_utils/codes.py,sha256=PV_S53Skggf4XetOdYoIKtEmM8cpN5wZwUlxje70WZY,904
4
4
  kisa_utils/config.py,sha256=NfluzGKTh66qfNtC-Ae0zNb1XzMTgU2Me9Vi82R9c1E,2285
5
5
  kisa_utils/dataStructures.py,sha256=ZgLpttJ66jfpU1NWzLDD1Czqxzj6sWereffgTQWhlV8,2679
6
- kisa_utils/dates.py,sha256=zxe4n0PdKReZjK5ZkvnCZtJ55lk5oqu9oS8VX_nLozw,13966
6
+ kisa_utils/dates.py,sha256=JN0vm-7_fOdpzLtondVmpjpWoePPJn4aGK0NkBuyF8I,14142
7
7
  kisa_utils/db.py,sha256=-0Q7iw9VEtf4oyOIj_IhJqmzeh0CZVp3vEcwIQn4Zls,54939
8
8
  kisa_utils/encryption.py,sha256=nFzNpzWV_D9uSEq4FsgCnlS7FQtqWP9fvM_81rsfcLo,4218
9
9
  kisa_utils/figures.py,sha256=pYIpQzu1OXRSsY1d98GhgPifnIRmgl-r7S32ai-Ms0c,3731
@@ -27,7 +27,7 @@ kisa_utils/servers/flask.py,sha256=XZYY1pWnP1mSvaS5Uv8G3EFJV5BJBQtU2gDbO8suvLc,4
27
27
  kisa_utils/structures/__init__.py,sha256=JBU1j3A42jQ62ALKnsS1Hav9YXcYwjDw1wQJtohXPbU,83
28
28
  kisa_utils/structures/utils.py,sha256=665rXIapGwFqejizeJwy3DryeskCQOdgP25BCdLkGvk,2898
29
29
  kisa_utils/structures/validator.py,sha256=JhD9jcfbjTwBr_7OfuNaJd_cYr7wR2emFhsCEo5MCHQ,4323
30
- kisa_utils-0.42.6.dist-info/METADATA,sha256=Dyk0-x1A4skPorhBkLVW6Dwf2Qs7WgilsaMlLR3mXTE,477
31
- kisa_utils-0.42.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
32
- kisa_utils-0.42.6.dist-info/top_level.txt,sha256=GFOLXZYqpBG9xtscGa2uGJAEiZ5NwsqHBH9NylnB29M,11
33
- kisa_utils-0.42.6.dist-info/RECORD,,
30
+ kisa_utils-0.42.7.dist-info/METADATA,sha256=NS58kF6uyqn0xEcjltRwD6IAEQArJqSB4N0_a_j6Ctg,477
31
+ kisa_utils-0.42.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
32
+ kisa_utils-0.42.7.dist-info/top_level.txt,sha256=GFOLXZYqpBG9xtscGa2uGJAEiZ5NwsqHBH9NylnB29M,11
33
+ kisa_utils-0.42.7.dist-info/RECORD,,