golang-module / carbon

A simple, semantic and developer-friendly golang package for time

Home Page:https://pkg.go.dev/github.com/golang-module/carbon/v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The W format in the FormatString method does not conform to the ISO-8601 standard, and there is no automatic zero padding

zxdstyle opened this issue · comments

Hello,

I encountered an issue with the following code:

carbon.Parse("2023-01-04 13:14:15").Format("YW")

golang version:1.18

carbon version: 2.1.9

I expected to get:

202301

But I actually get:

20231

Thanks!

Fixed in v1.7.3 and v2.2.3