Skip to content

Add time pinning for intervals #6

@xymaxim

Description

@xymaxim

The time-pinning idea was discussed in a different context in #4, but it can be useful on its own. We already use pinning a start-up time to resolve the now keyword, and adding a --now flag will make interval values clearer in some cases.

Proposed usage examples

  1. Run commands around a specific moment
# Before
ypb download --interval '2026-01-02T10:20:30+00 - 10m/2026-01-02T10:20:30+00 + 10m' ...

# After
ypb download --interval 'now - 10m/now + 10m' --now 2026-01-02T10:20:30+00 ...
  1. Run the same --interval value for different days
# Before
ypb download --interval 10:20/1h ...
ypb download --interval '10:20 - 1d/1h - 1d' ...

# After
ypb download --interval '10:20/1h' ...
ypb download --interval '10:20/1h' --now 2026-01-02 ...
ypb download --interval '10:20/1h' --now 'now - 1d' ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions