Skip to content

add Time convert functions#74

Open
aprimault wants to merge 2 commits intomasterfrom
time-to-str
Open

add Time convert functions#74
aprimault wants to merge 2 commits intomasterfrom
time-to-str

Conversation

@aprimault
Copy link
Copy Markdown

No description provided.

@aprimault aprimault requested review from alkanna and julakmane May 30, 2024 07:26
convert/conv.go Outdated
func TimeStrToRFC3339(s string) string {
t, err := time.Parse(time.RFC3339, s)
if err != nil {
t, err = time.Parse("20060102T150405", s)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layout à mettre en arg

convert/conv.go Outdated
func TimeStrToStr(s string, withTZ bool) string {
t, err := time.Parse(time.RFC3339, s)
if err != nil {
t, err = time.Parse("20060102T150405", s)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

convert/conv.go Outdated
return t.Format("2006-01-02T15:04:05")
}

func TimeStrToStr(s string, withTZ bool) string {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFCTimeStrToStr

@aprimault aprimault requested a review from julakmane May 30, 2024 09:01
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 this pull request may close these issues.

3 participants