dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
6.77k stars 191 forks source link

Add date format option to defaults #352

Closed miniscruff closed 2 months ago

miniscruff commented 3 months ago

Currently only affects the updated at field for PRs and issues. Hoping to get feedback on this idea and help contribute to documentation or schema update as required.

Closes #67

Summary

How did you test this change?

This config will use a simple yyyy-mm-dd format with a larger column layout. Not entirely sure why its 12 width and not 10, maybe there is some padding by default.

defaults:
  layout:
    prs:
      updatedAt:
        width: 12
        grow: true
  dateFormat: "2006-01-02"

The special value of RELATIVE, or no value at all, will keep the existing relative dates.

defaults:
  dateFormat: "relative"

Images/Videos

gh-dash-updated-at-date-format

With format 2006-01-02

dlvhdr commented 3 months ago

Looks simple enough. nit Can we have the value be lower case relative? Also, what about the time? HH:MM I think that since this is written in Go, we should just follow Go's time.Format: https://go.dev/src/time/format.go and instruct users that's the format we expect

miniscruff commented 3 months ago

Looks simple enough. nit Can we have the value be lower case relative? Also, what about the time? HH:MM I think that since this is written in Go, we should just follow Go's time.Format: go.dev/src/time/format.go and instruct users that's the format we expect

Correct, it is using the go time format, so adding some sort of docs link would probably be helpful.

By lower case relative do you mean compare to relative or make it case insensitive by allowing any form of Relative?

dlvhdr commented 3 months ago

Yeah lowercase relative is my preference. We do have a docs site that you can add to. It's a kind of hugo site.

miniscruff commented 3 months ago

Yeah lowercase relative is my preference. We do have a docs site that you can add to. It's a kind of hugo site.

Gotcha, on it. Do you by chance have any tips on getting hugo to run locally. I did some research and have used hugo before but can't seem to get it working.

dlvhdr commented 3 months ago

Can you please attach a screenshot of how this looks with a custom date?

miniscruff commented 2 months ago

Can you please attach a screenshot of how this looks with a custom date?

Added