Skip to content

Add support for level of specificity in date range #5

@curtisgibby

Description

@curtisgibby

This is a great project! It fills almost perfectly a need that I have. However, in my use-case, I would like to be more generic about the date range, by dropping the day field. For example, I currently get back from ranger->format() the text Jan 8 – Oct 26, 2020, but it would be nice to just say Jan – Oct 2020. (Or for the example dates Oct 13–26, 2020, simply saying Oct 2020.)

I could see potential use cases for dropping even the month:

  • For my dates above, outputting just 2020
  • An employment history (2015–2020)
  • A sports season (2019–2020)
  • A person's birth and death dates on a tombstone (1951–2013)

Is this theoretically possible in Ranger right now? Monkeying around with its internals, I seemed to find problems with creating an IntlDateFormatter using only parts of the date.

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