none-shall-parse 0.4.7__py3-none-any.whl → 0.4.8__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.
@@ -14,7 +14,7 @@ from __future__ import annotations
14
14
  from .dates import (
15
15
  DateUtilsError, assert_week_start_date_is_valid,
16
16
  assert_month_start_date_is_valid,
17
- get_datetime_now, za_now,
17
+ get_datetime_now, za_now, utc_now,
18
18
  za_ordinal_year_day_now,
19
19
  za_ordinal_year_day_tomorrow, utc_epoch_start,
20
20
  now_offset_n_minutes, now_offset_n_hours,
@@ -85,7 +85,7 @@ __license__ = "MIT"
85
85
  __all__ = (
86
86
  "DateUtilsError", "assert_week_start_date_is_valid",
87
87
  "assert_month_start_date_is_valid",
88
- "get_datetime_now", "za_now",
88
+ "get_datetime_now", "za_now", "utc_now",
89
89
  "za_ordinal_year_day_now",
90
90
  "za_ordinal_year_day_tomorrow", "utc_epoch_start",
91
91
  "now_offset_n_minutes", "now_offset_n_hours",
none_shall_parse/dates.py CHANGED
@@ -71,6 +71,15 @@ def za_now() -> DateTime:
71
71
  return get_datetime_now(naive=False, tz=ZA_TZ)
72
72
 
73
73
 
74
+ def utc_now() -> DateTime:
75
+ """
76
+ Shorthand for the current date and time in the UTC timezone.
77
+ Returns:
78
+ pendulum.DateTime: The current date and time in the UTC timezone.
79
+ """
80
+ return get_datetime_now(naive=False, tz=UTC_TZ)
81
+
82
+
74
83
  def za_ordinal_year_day_now() -> int:
75
84
  """
76
85
  Returns the current ordinal day of the year for the ZA_TZ timezone.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: none-shall-parse
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Summary: Trinity Shared Python utilities.
5
5
  Author: Andries Niemandt, Jan Badenhorst
6
6
  Author-email: Andries Niemandt <andries.niemandt@trintel.co.za>, Jan Badenhorst <jan@trintel.co.za>
@@ -1,10 +1,10 @@
1
- none_shall_parse/__init__.py,sha256=s4Io6JrTdMnFLmMYqsm3XVKK6YFnp3hx8ZCjWO-W9IE,3877
2
- none_shall_parse/dates.py,sha256=Mh_BLxHlrXZHH_8Js_1C8cVdxH0Lm8A627auOrjUe0c,26822
1
+ none_shall_parse/__init__.py,sha256=ekNMvJaRzR-SOv2bQAOuH86ImPHXGpIj2NbeCO45GOc,3897
2
+ none_shall_parse/dates.py,sha256=16vvvdkTyrxFe9DsV5e2keOQ_xlp1dnb2Oi6i-co6z8,27071
3
3
  none_shall_parse/imeis.py,sha256=20pONoUhLKomZxAJegqSSjG72hZjYs60r8IcaRt-15M,6770
4
4
  none_shall_parse/lists.py,sha256=PKtYD8H1Z7MqbJQ5eFpsK_jgexLwiratMJiYeRMiOwc,1701
5
5
  none_shall_parse/parse.py,sha256=77bXZAtwFksRwuZ9Ax0lPxEjFpyjkQBqRa5mBc1WkF4,6843
6
6
  none_shall_parse/strings.py,sha256=F7491CJAHJjL7vdEGwoH_4S6PjaovYUS_yzVGJ-bYIE,8463
7
7
  none_shall_parse/types.py,sha256=WAgILMtW2_fm9MBpUuQvq68yXYBNd3rnSoQk70ibOd4,1320
8
- none_shall_parse-0.4.7.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
9
- none_shall_parse-0.4.7.dist-info/METADATA,sha256=q22i0c6pLEFsiLQz0cO2riY-chiGWQ6M24Nqi0xAbes,1701
10
- none_shall_parse-0.4.7.dist-info/RECORD,,
8
+ none_shall_parse-0.4.8.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
9
+ none_shall_parse-0.4.8.dist-info/METADATA,sha256=vBHgaT1rvFVt9nv85G4Af-R0wqDM7cAHGSWVE-DMKv8,1701
10
+ none_shall_parse-0.4.8.dist-info/RECORD,,