Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix time formatting bug for 12:00 AM #45

Open
rokane opened this issue Jan 13, 2024 · 0 comments
Open

Fix time formatting bug for 12:00 AM #45

rokane opened this issue Jan 13, 2024 · 0 comments

Comments

@rokane
Copy link

rokane commented Jan 13, 2024

Description

This issue follows from #41 where the same bug is present in a number of the 'en' locales. Any of the en locales which should be formatting time according to the h hour pattern will cause the same bug.

To Reproduce

package main

import (
	"fmt"
	"time"
         en "github.com/go-playground/locales/en_AE"
)

func main() {
	datetime := time.Date(2016, 02, 03, 0, 0, 1, 0, time.Local)
	l := en.New()
	fmt.Println(l.FmtTimeShort(datetime))
}

That code should print 12:00 am but instead it prints 0:00 am.

Changes Required

#44 addresses this fix for the en locale. The same fix needs to be applied to the set of en locales below:

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

No branches or pull requests

1 participant