-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: date related changes for go package #199
base: master
Are you sure you want to change the base?
Conversation
|
) | ||
|
||
// IntlOptions represents the options for formatting the date and time. | ||
type IntlOptions struct { |
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.
What does Intl mean?
Internal or International
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.
InternationalizationOptions
if hour12 { | ||
return t.Format("1/2/2006, 3:04:05 PM") | ||
} | ||
return t.Format("1/2/2006, 15:04:05") |
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.
should we include time zone also here?
1/2/2006, 15:04:05 IST
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.
"2006-01-02T15:04:05Z07:00" This format includes GMT timezones. Format (RFC3339) in supported_date_times.go
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.
Also go by default only supports UTC/Local timezone (local being getting from systemenv) for custom locale we have to make a map and then convert this. Like we maintained timezones in country_subDivisions, should we maintain a locale map also? this will enable us to add more support. This can be an example:
["IST" : "Asia/Kolkata"] -> this will enable us to return time in format -> 1/22/2025, 6:23:11 PM IST
} | ||
|
||
// SupportedDateFormats holds all globally supported date formats | ||
var SupportedDateFormats = []DateFormat{ |
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.
Are we supporting partial dates?
like only year or year-month
… pt/date-related-changes-go
… pt/date-related-changes-go
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Changes Made
List the main changes made in this pull request.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Additional Notes
Any additional information that would be helpful for the reviewer.
Checklist:
Reviewer Checklist
PR Title Format
Format:
<type>: <subject>
Types can be as follows:
feat
: (new feature for the user, not a new feature for build script)fix
: (bug fix for the user, not a fix to a build script)docs
: (changes to the documentation)style
: (formatting, missing semi colons, etc; no production code change)refactor
: (refactoring production code, eg. renaming a variable)test
: (adding missing tests, refactoring tests; no production code change)chore
: (updating grunt tasks etc; no production code change)