dately 2.0.0__tar.gz → 2.0.3__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.
Files changed (26) hide show
  1. {dately-2.0.0 → dately-2.0.3}/PKG-INFO +1 -1
  2. {dately-2.0.0 → dately-2.0.3}/dately/timeutils.py +1 -0
  3. {dately-2.0.0 → dately-2.0.3}/dately/timezone.py +6 -6
  4. {dately-2.0.0 → dately-2.0.3}/dately.egg-info/PKG-INFO +1 -1
  5. {dately-2.0.0 → dately-2.0.3}/setup.py +1 -1
  6. {dately-2.0.0 → dately-2.0.3}/README.md +0 -0
  7. {dately-2.0.0 → dately-2.0.3}/dately/__init__.py +0 -0
  8. {dately-2.0.0 → dately-2.0.3}/dately/core.py +0 -0
  9. {dately-2.0.0 → dately-2.0.3}/dately/mold/__init__.py +0 -0
  10. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/Compiled.cp38-win_amd64.pyd +0 -0
  11. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/__init__.py +0 -0
  12. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/cdatetime/UniversalDateFormatter.cp38-win_amd64.pyd +0 -0
  13. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/cdatetime/__init__.py +0 -0
  14. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/cdatetime/iso8601T.cp38-win_amd64.pyd +0 -0
  15. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/cdatetime/iso8601Z.cp38-win_amd64.pyd +0 -0
  16. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/cdatetime/whichformat.cp38-win_amd64.pyd +0 -0
  17. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/clean_str.cp38-win_amd64.pyd +0 -0
  18. {dately-2.0.0 → dately-2.0.3}/dately/mold/pyd/time_zones.cp38-win_amd64.pyd +0 -0
  19. {dately-2.0.0 → dately-2.0.3}/dately/mskutils.py +0 -0
  20. {dately-2.0.0 → dately-2.0.3}/dately/sysutils.py +0 -0
  21. {dately-2.0.0 → dately-2.0.3}/dately/utils.py +0 -0
  22. {dately-2.0.0 → dately-2.0.3}/dately.egg-info/SOURCES.txt +0 -0
  23. {dately-2.0.0 → dately-2.0.3}/dately.egg-info/dependency_links.txt +0 -0
  24. {dately-2.0.0 → dately-2.0.3}/dately.egg-info/requires.txt +0 -0
  25. {dately-2.0.0 → dately-2.0.3}/dately.egg-info/top_level.txt +0 -0
  26. {dately-2.0.0 → dately-2.0.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dately
3
- Version: 2.0.0
3
+ Version: 2.0.3
4
4
  Summary: A library for manipulating datetime strings.
5
5
  Home-page: https://github.com/cedricmoorejr/dately
6
6
  Author: Cedric Moore Jr.
@@ -10,6 +10,7 @@ from .mold.pyd.Compiled import (
10
10
  timemeridiem_regex,
11
11
  timeboundary_regex,
12
12
  time_only_regex,
13
+ timezone_offset_regex,
13
14
  get_time_fragment as gtf,
14
15
  )
15
16
 
@@ -430,11 +430,13 @@ class DatelyTz:
430
430
  def __init__(self, rq_instance=None):
431
431
  """Initialize the DatelyTz class. Loads data from file if it exists, otherwise fetches from the API and saves it."""
432
432
  self.tzone_manager = tzoneDataManager()
433
+ self.Request = rq_instance # Assign rq_instance to self.Request
434
+
433
435
  if tzoneDataManager.data_file_exists():
434
436
  self.tzone_manager.load_data_from_file()
435
437
  self.timezonedata = self.tzone_manager.timezonedata
436
438
  else:
437
- self.timezonedata = self._from_api()
439
+ self.timezonedata = self._from_api() # Note the change here
438
440
  self.tzone_manager.timezonedata = self.timezonedata
439
441
  self.tzone_manager.save_data_to_file()
440
442
 
@@ -442,8 +444,7 @@ class DatelyTz:
442
444
  self.tzone_manager.load_data_from_file()
443
445
  self.timezonedata = self.tzone_manager.timezonedata
444
446
 
445
- @classmethod
446
- def _from_api(cls):
447
+ def _from_api(self):
447
448
  """Fetch data from the API with a controlled request interval. Formats and returns the data."""
448
449
  if not self.Request:
449
450
  return None
@@ -451,12 +452,11 @@ class DatelyTz:
451
452
  result = self.Request.make_request(params)
452
453
  if 'response' in result:
453
454
  data = result['response']
454
- return cls._format_api_data(data)
455
+ return self._format_api_data(data) # Changed cls to self
455
456
  else:
456
457
  return result
457
458
 
458
- @classmethod
459
- def _format_api_data(cls, data):
459
+ def _format_api_data(self, data):
460
460
  """Format the API data, adjusting offsets and handling zone information. Returns the formatted data."""
461
461
  if 'zones' in data:
462
462
  zones_data = data['zones']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dately
3
- Version: 2.0.0
3
+ Version: 2.0.3
4
4
  Summary: A library for manipulating datetime strings.
5
5
  Home-page: https://github.com/cedricmoorejr/dately
6
6
  Author: Cedric Moore Jr.
@@ -8,7 +8,7 @@ if sys.platform != 'win32':
8
8
 
9
9
  setup(
10
10
  name="dately",
11
- version="2.0.0",
11
+ version="2.0.3",
12
12
  author="Cedric Moore Jr.",
13
13
  author_email="cedric@doydl.tech",
14
14
  description="A library for manipulating datetime strings.",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes