Skip to content

Allow infinite sequences (dateseq) #165

@Entze

Description

@Entze

Proposal:
Extend dateseq to also generate a sequence of infinite dates, similar to the yes program which outputs a given string until interrupted.

For example:

dateseq --skip Saturday,Sunday 1970-01-01 1d 1970-12-31 | sed --regexp-extended '/[0-9]{4}-11-01/d'

This would output all weekdays in 1970 that are not the first of November. Which is already supported.

Additionally, the program should support more complex date filtering, where the LAST date is not known in advance. In this case, the program should continue outputting dates until a filtering condition is met, without requiring the user to know the final date in advance. For example:

dateseq --skip Saturday,Sunday 1970-01-01 1d | filter | head --lines 1

This would output the first date that passes the filter condition (or loop indefinitely), without needing to specify a LAST date.

Please let me know if you have any other questions or need further clarification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions