SwiftDate icon indicating copy to clipboard operation
SwiftDate copied to clipboard

Twitter style formatter doesn't work as advertised

Open danqing opened this issue 5 years ago • 7 comments

Hi,

This is the same issue as #684 that I opened (since it has been closed). The Twitter style formatter doesn't work as advertised. As of v6.1.0 the issue is still present (and the test is testing the wrong string, as seen below). #684 has more pointers to the problematic changes. If this is intended, can you update the documentation? If it is not (and I hope it's not! because o/w Twitter style isn't really Twitter style anymore..) can you change it back? :)

https://github.com/malcommac/SwiftDate/blob/86644f41fa10b023b5e6f3f548a0dda9415f43b0/Tests/SwiftDateTests/TestFormatters.swift#L519

Thank you!

danqing avatar Oct 03 '19 14:10 danqing

Hi @malcommac any thoughts on this? Thanks!

danqing avatar Feb 12 '20 08:02 danqing

This is pretty unfortunate. I'm literally using this pod only to format dates in twitter style...I guess gonna have to revert back to an older version.

lschwe avatar May 27 '20 13:05 lschwe

yup same here...shame this issue isn't handled properly...like no comments and not matching documentation

timothyerwin avatar Jan 05 '21 18:01 timothyerwin

Having the same issue, not getting "3m" like in README. For hours i.e. I get "11 hr. ago".

vburojevic avatar Jan 21 '21 08:01 vburojevic

It seems that the JSON files don't even have that type of abbreviated format. @malcommac was there a support for this before? Is it possible to add these translations back?

vburojevic avatar Jan 21 '21 09:01 vburojevic

This last worked fine in 6.0.2. You need reference that version, which is already pretty unfortunate.

But even if you get that version, twitterStyle is bugged as per this issue: #579

balazserdeszlogmein avatar Mar 05 '21 17:03 balazserdeszlogmein

Looks like the switch from 6.0.2 to 6.0.3 to .json files for languages actually removed the .tiny specification which is used by the .twitter flavor.

There is no tiny specifications in any of the JSON language files...

martindufort avatar Jan 30 '23 20:01 martindufort