Twindle: CLI user fetch thread created date

Created on 12 Nov 2020  路  11Comments  路  Source: twindle-co/twindle

image
Threadcreated:Mar14,2009
This date should be CLI run date.

node . -u dvassallo -n 10

@Mira-Alf you no need to fix this. Let someone new to the codebase fix this.

good first issue

All 11 comments

@proful Can I work on this issue?

@proful Can I work on this issue?

Anyone is free to jump in and tweak stuff. In fact we encourage it馃槈

You may wanna look in user_timeline.js somewhere inside Twitter folder. The stuff is there.

@PuruVJ Do correct me if I'm wrong. I think this is related to hbs templates under the 'renderer' folder.
Let me know

@PuruVJ Do correct me if I'm wrong. I think this is related to hbs templates under the 'renderer' folder.

Let me know

The date generation and manipulation happens in the file I started above. You'll find a statement don't datetime formatting. It needs to be changed to the current date.

in utils/date.js u have to do this --> const formatTimestamp = () => format(new Date(), "MMM d, yyyy"); this will give current date.

It should be set to today's date only when passing user ID.

No changes when reading threads

woops! that i didn't notice let me see

in utils/date.js u have to do this --> const formatTimestamp = () => format(new Date(), "MMM d, yyyy"); this will give current date.

No no! This is a common util function and should stay so. The change needs to happen in user_timeline.js only. formatTimestamp(new Date().toString()) should do it.

i made changes in useer-timeline-endpoint.js
previous: resp.common.created_at = formatTimestamp(user.created_at);
now: resp.common.created_at = formatTimestamp(new Date());
now its working

in utils/date.js u have to do this --> const formatTimestamp = () => format(new Date(), "MMM d, yyyy"); this will give current date.

No no! This is a common util function and should stay so. The change needs to happen in user_timeline.js only. formatTimestamp(new Date().toString()) should do it.

yes i realised that i was changing the whole global function which would change dates everywhere

@tr0mbl3y Good work! make your PR, we'll review and merge it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vasudeveloper001 picture vasudeveloper001  路  4Comments

proful picture proful  路  5Comments

Mira-Alf picture Mira-Alf  路  3Comments

tusharkandpal picture tusharkandpal  路  3Comments

proful picture proful  路  4Comments