spencermountain / spacetime

A lightweight javascript timezone library
http://spacetime.how/
Other
3.97k stars 183 forks source link

spacetime('9-1-2021').unixFmt('MMM') === 'Sept' #304

Closed svey closed 2 years ago

svey commented 3 years ago

The issue I'm seeing is spacetime('9-1-2021').unixFmt('MMM') === 'Sept'— unless I'm missing something, I believe this should be a 3 digit month. Same for .format('month-short') although if the ladder remains 4 digits I guess month short is subject to interpretation

spencermountain commented 3 years ago

hey @svey - i'm confused about what the issue is - is it the input format, or the 'MMM' output? both seem valid to me, can you clarify? thanks

svey commented 3 years ago

hey @svey - i'm confused about what the issue is - is it the input format, or the 'MMM' output? both seem valid to me, can you clarify? thanks

Hey @spencermountain — sorry for the confusion. Every other library I've tried MMM unix formatting return a 3 characters month. Only on spacetime does this return 4 characters and it's only for September— our team only discovered this a few days ago when the month hit September and our testing suite is looking for 'Sep'. Just seems odd that MMM [Jan, Feb, Mar, Jun, Jul, Aug, Sept, Oct, Nov, Dec].

My suggestion would be let the unix format MMM default to Sep and let month-short be Sept. Hope that makes sense— and I really appreciate you taking the time to get back to me

spencermountain commented 3 years ago

ahh, yeah. I agree. I don't know why it does 'Sept'. I've seen this too. I will add this to the next release. Sorry about that. Agree we should return the same as the other libs here. cheers

svey commented 2 years ago

thanks @spencermountain !

spencermountain commented 2 years ago

fixed in 7.0.0 cheers