Skip to content

handle single argument time expressions more naturally #3

@trvsdnn

Description

@trvsdnn

Currently if you give a single argument, it will be parsed by chronic and the log file will be filtered from the given time argument up until now. This is less intuitive than i'd like, and doesn't really make sense if what you want is to sample a single day/week/hour/etc. The code is pretty simple at the moment and i'd like to keep it as straight forward as possible.

One possible solution to the problem is to make chainsaw pre-parse the single argument and have a list of "formats" that we know would want to be a sample range in itself (2011-7-20, last week, etc), if it wasn't one of the formats, we could just treat it as we treat it now and sample it from the parsed date up until now. Then to support the "original" style, we could take a first argument being the time expression and the second argument being the "-" but without a third argument, this would imply time expression till now.

Thinking...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions