You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Vue JS SPA that queries takes a keyword and returns 10 tweets from Twitter which contain that keyword. These tweets are mixed (some popular + some recent). The dataset that Twitter returns contains the created_at timestamp in the following format:
Wed Jul 17 04:20:30 +0000 2019
In my Vue file's template section, I am displaying a tweet's created_at date using the following code:
The result of this is quite odd. It is displaying some of the tweets correctly, and the others it is printing out the entire date + format string code. Here is a screenshot of the result:
I just can't for the life of me figure out how it is working in some cases and not in others. All the dates are received in the same format and go through the same parsing format.
Any help would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
Sure @BrockReece - as you see from the screenshots, the 2nd and the last entries are showing the correct moment('calendar') version of the date, which means that they parsed correctly. They were in the exact same format. For example, this is the created_at value for the 2nd tweet in the list: Wed Jul 17 16:17:59 +0000 2019 - which parsed correctly.
My suspicion is that tweets that are made 'ahead' of my current time (due to timezone differences) are causing a problem.
I have a Vue JS SPA that queries takes a keyword and returns 10 tweets from Twitter which contain that keyword. These tweets are mixed (some popular + some recent). The dataset that Twitter returns contains the created_at timestamp in the following format:
Wed Jul 17 04:20:30 +0000 2019
In my Vue file's template section, I am displaying a tweet's created_at date using the following code:
{{ [tweet.created_at, "ddd MMM DD HH:mm:ss Z YYYY"] | moment("calendar") }}
The result of this is quite odd. It is displaying some of the tweets correctly, and the others it is printing out the entire date + format string code. Here is a screenshot of the result:
I just can't for the life of me figure out how it is working in some cases and not in others. All the dates are received in the same format and go through the same parsing format.
Any help would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: