Skip to content

feat(args): parse countdown by given time (past or future)#112

Merged
sectore merged 10 commits intomainfrom
feat/cd-by-dt
Oct 1, 2025
Merged

feat(args): parse countdown by given time (past or future)#112
sectore merged 10 commits intomainfrom
feat/cd-by-dt

Conversation

@sectore
Copy link
Copy Markdown
Owner

@sectore sectore commented Sep 30, 2025

New

  • argument countdown-target (alias ct)
--countdown-target <COUNTDOWN_TARGET>
          Countdown targeting a specific time in the future or past. Formats: 'yyyy-mm-dd hh:mm:ss', 'yyyy-mm-dd hh:mm', 'hh:mm:ss', 'hh:mm', 'mm' [aliases: --ct]
  • DirectedDuration = Duration pointing to past or future moment
  • parse_duration_by_time to get DirectedDuration from arguments

Examples

future

cargo run -- --countdown-target "2030-01-10 18:00"

cd-future

past

cargo run -- --countdown-target "2024-01-10 18:00"

cd-past

BTW: Same functionality can be used for upcoming events (#93).

Closes #104

@sectore sectore merged commit 3f4acec into main Oct 1, 2025
3 checks passed
@sectore sectore deleted the feat/cd-by-dt branch October 1, 2025 10:40
sectore added a commit that referenced this pull request Oct 8, 2025
Reverts #112.

For targeting a date (past/future) a new `event` feature will be
introduced (soon).
sectore added a commit that referenced this pull request Oct 8, 2025
Reverts #112.

For targeting a date (past/future) a new `event` feature will be
introduced (soon).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend CLI for countdown to accept date time in future

1 participant