From 251ef41078909d2f2f1e650e1a88228085aaf764 Mon Sep 17 00:00:00 2001 From: Ross Patterson Date: Thu, 21 Aug 2025 07:40:00 -0700 Subject: [PATCH] docs(faq): Clarify re-download date TZ margins From [Discord discussion](https://discord.com/channels/994270357957648404/1102703969266049174/1408092149492224060). --- docs/source/config_reference/plugins.rst | 8 +++++--- docs/source/faq/index.rst | 7 ++++--- src/ytdl_sub/plugins/date_range.py | 8 +++++--- src/ytdl_sub/validators/string_datetime.py | 8 +++++--- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/source/config_reference/plugins.rst b/docs/source/config_reference/plugins.rst index bc8bf0a3..633de41b 100644 --- a/docs/source/config_reference/plugins.rst +++ b/docs/source/config_reference/plugins.rst @@ -147,9 +147,11 @@ Dates must adhere to a yt-dlp datetime. From their docs: A string in the format YYYYMMDD or (now|today|yesterday|date)[+-][0-9](microsecond|second|minute|hour|day|week|month|year)(s) -Valid examples are ``now-2weeks`` or ``20200101``. Can use override variables in this. -Note that yt-dlp will round times to the closest day, meaning that `day` is the lowest -granularity possible. +Valid examples are ``now-2weeks`` or ``20200101``. Can use override variables in +this. Note that yt-dlp will round times to the closest day, meaning that `day` is +the lowest granularity possible. Also note that, considering time zones, it's best +to include a margin of an extra day on either side to be sure it includes the +intended download files. :Usage: diff --git a/docs/source/faq/index.rst b/docs/source/faq/index.rst index b33a4b55..0a2105c0 100644 --- a/docs/source/faq/index.rst +++ b/docs/source/faq/index.rst @@ -195,9 +195,10 @@ need to be removed: the subscriptions ` to download only the files that you've renamed in the steps above. - Set the appropriate dates and subscription name to include only the files you've - renamed, and re-run. For example, if you've renamed all the files from 2024 in the - ``NOVA PBS`` subscription: + Set the appropriate dates, :ref:`including a sufficient margin + `, and subscription name to include only the + files you've renamed, and re-run. For example, if you've renamed all the files from + 2024 in the ``NOVA PBS`` subscription: .. code-block:: shell diff --git a/src/ytdl_sub/plugins/date_range.py b/src/ytdl_sub/plugins/date_range.py index 34370a1a..b7bf6dd0 100644 --- a/src/ytdl_sub/plugins/date_range.py +++ b/src/ytdl_sub/plugins/date_range.py @@ -25,9 +25,11 @@ class DateRangeOptions(ToggleableOptionsDictValidator): A string in the format YYYYMMDD or (now|today|yesterday|date)[+-][0-9](microsecond|second|minute|hour|day|week|month|year)(s) - Valid examples are ``now-2weeks`` or ``20200101``. Can use override variables in this. - Note that yt-dlp will round times to the closest day, meaning that `day` is the lowest - granularity possible. + Valid examples are ``now-2weeks`` or ``20200101``. Can use override variables in + this. Note that yt-dlp will round times to the closest day, meaning that `day` is + the lowest granularity possible. Also note that, considering time zones, it's best + to include a margin of an extra day on either side to be sure it includes the + intended download files. :Usage: diff --git a/src/ytdl_sub/validators/string_datetime.py b/src/ytdl_sub/validators/string_datetime.py index d50be211..53e7bb52 100644 --- a/src/ytdl_sub/validators/string_datetime.py +++ b/src/ytdl_sub/validators/string_datetime.py @@ -12,9 +12,11 @@ class StringDatetimeValidator(OverridesStringFormatterValidator): A string in the format YYYYMMDD or (now|today|yesterday|date)[+-][0-9](microsecond|second|minute|hour|day|week|month|year)(s) - Valid examples are ``now-2weeks`` or ``20200101``. Can use override variables in this. - Note that yt-dlp will round times to the closest day, meaning that `day` is the lowest - granularity possible. + Valid examples are ``now-2weeks`` or ``20200101``. Can use override variables in + this. Note that yt-dlp will round times to the closest day, meaning that `day` is + the lowest granularity possible. Also note that, considering time zones, it's best + to include a margin of an extra day on either side to be sure it includes the + intended download files. """ _expected_value_type_name = "datetime string"