Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customizable date format #517

Closed
scarf005 opened this issue Sep 4, 2023 · 3 comments · Fixed by #614
Closed

customizable date format #517

scarf005 opened this issue Sep 4, 2023 · 3 comments · Fixed by #614

Comments

@scarf005
Copy link
Contributor

scarf005 commented Sep 4, 2023

image

users using YMD date format may have difficulty reading 'Human' date format.

I'm using patch file to work around the issue, but It'd be great to be able to customize date format.

func FormatDateTimeHuman(date time.Time) string {
	return date.Format("2006-01-02 15:04:05 Mon")
}

func FormatDateHuman(date time.Time) string {
	return date.Format("2006-01-02 Mon")
}

wakapi/helpers/date.go

Lines 35 to 42 in 7f2544f

func FormatDateTimeHuman(date time.Time) string {
return date.Format("Mon, 02 Jan 2006 15:04")
}
func FormatDateHuman(date time.Time) string {
return date.Format("Mon, 02 Jan 2006")
}

@muety
Copy link
Owner

muety commented Sep 4, 2023

Hi @scarf005, thanks for this feature request! I see how customizable dates would add to better user experience.

However, this touches on the whole big topic of internationalization / i18n, which we decided to be out of scope for Wakapi. Currently, all of Wakapi is in en_US locale (speaking in nerd's terms) as sort of the lowest common denominator. I would love to add in multi-language support, customizable dates, etc. to improve the experience for international users. But, unfortunately, I think it would be way too big of an effort for a project of Wakapi's size and I'd rather prefer to spend our very limited capacity on feature development instead. Wakapi's philosophy is to be minimalist and keep things simple in many different regards.

Sorry to close this issue! Hope you'll still enjoy using Wakapi and keep contributing :-)

@muety muety closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2023
@scarf005
Copy link
Contributor Author

scarf005 commented Sep 4, 2023

I don't think this issue is related to internalization at all. What i meant was options to choose such as:

  • YYYY-mm-dd
  • mm/dd/yyyy
  • dd/mm/yyyy
  • dd Month year

@muety
Copy link
Owner

muety commented Sep 4, 2023

Yes, I got that point. But I think it add comparatively low benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants