-
Notifications
You must be signed in to change notification settings - Fork 94
feat: Add SetLocation and SetLocale methods and unit test cases #1002
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
Conversation
# Conflicts: # support/carbon/carbon.go
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## v1.15.x #1002 +/- ##
==========================================
Coverage ? 70.08%
==========================================
Files ? 234
Lines ? 19676
Branches ? 0
==========================================
Hits ? 13789
Misses ? 5225
Partials ? 662 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
support/carbon/carbon_test.go
Outdated
c := Parse("2025-04-11 00:00:00") | ||
|
||
assert.Equal(t, "zh-CN", c.Locale()) | ||
assert.Equal(t, "η½ηΎεΊ§", c.Constellation()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB
support/carbon/carbon_test.go
Outdated
assert.Equal(t, 28800, c.ZoneOffset()) | ||
assert.Equal(t, "2025-04-11 00:00:00 +0800 CST", c.ToString()) | ||
} | ||
|
||
func TestTimezone(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func TestTimezone(t *testing.T) { | |
func TestSetTimezone(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
And FYI, the new functions can not be added to v1.15.x if they are optional, otherwise, we need to create the same PR for master. |
Is the |
I will create v1.16 based on master when releasing v1.16. |
π Description
Add SetLocation and SetLocale methods and unit test cases
β Checks