formkit / tempo

πŸ“† Parse, format, manipulate, and internationalize dates and times in JavaScript and TypeScript.
https://tempo.formkit.com
MIT License
2.37k stars 33 forks source link

format YYYY-MM returns YYYY-M #41

Closed tiamed closed 7 months ago

tiamed commented 8 months ago

https://codepen.io/tiamed/pen/PogGXKj

format(new Date(), 'YYYY-MM') should return '2024-03' but returned '2024-3'

justin-schroeder commented 8 months ago

Hmmm...

image

Not for me. what locale are you in? Perhaps there is some bug regarding specific locales we need to sort out.

tiamed commented 8 months ago

Hmmm...

image

Not for me. what locale are you in? Perhaps there is some bug regarding specific locales we need to sort out.

The locale is zh-CN

melodyclue commented 8 months ago

Hi, Maybe I have same issue at ja locale.

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2024-03-19 10 28 59 γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2024-03-25 18 25 55