Skip to content

Return Precision (of range)? #68

Description

@oschrenk

Prerequisites

  • I searched to see if the issue already exists.

Description

My notetaking app distinguishes daily and weekly notes (fwiw also monthly, quarterly, and yearly).

go-anytime works great for targeting notes of a specific day ./notes "last friday". Now I'm trying to think of a way to target the weekly notes eg. ./notes "last week"

This of course gives me last week's day back (relative to today).

parsed_, err := anytime.Parse(args[0], time.Now())
parsedRange, _ := anytime.ParseRange(args[0], time.Now())
[...]
2024-01-21 00:00:00 -0600 CST
{time: 2024-01-21 00:00:00 -0600 CST, duration: 167h59m59s}

That is great for most uses cases, but I "lost" the precision that I wss asking for a week (or maybe a month, or a specific hour).

Would you have an idea of how to target the intended precision?

Steps to Reproduce

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