-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Open
Labels
ProposalWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Description
Problem Description
Currently, the Go time package lacks predefined constants to represent datetime formats with millisecond(e.g., 2006-01-02 15:04:05.000), microsecond(e.g., 2006-01-02 15:04:05.000000), and nanosecond(e.g., 2006-01-02 15:04:05.000000000) precision. This requires developers to manually write format strings when they need to use these datetime formats.
Solution
I propose adding three constants in the time package to represent the "2006-01-02 15:04:05.000", "2006-01-02 15:04:05.000000", and "2006-01-02 15:04:05.000000000" datetime formats, making it convenient for developers to use in their projects.
Example
These constants could be named DatetimeMilli, DatetimeMicro, and DatetimeNano, and developers could use them as follows:
formattedTimeMilli := time.Now().Format(time.DatetimeMilli)
formattedTimeMicro := time.Now().Format(time.DatetimeMicro)
formattedTimeNano := time.Now().Format(time.DatetimeNano)Metadata
Metadata
Assignees
Labels
ProposalWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Type
Projects
Status
Incoming