I am using the Twitter api for getting tweets in a Flutte App.
The api returns a formatted date like this:
Wed Jun 12 00:08:35 +0000 2019
DateTime formatTwitterDate() {
final format = DateFormat('EEE MMM dd hh:mm:ss +0000 yyyy'); //todo failed to resolve +0000
return format.parse(this);
}
This is the only formatter I got working. How can I support +0000?
2
Answers
Used this javascript implementation and transformed it to a DartExtension
https://stackoverflow.com/a/2611438/5115254
Porting this answer to dart