AsyncStorage 创建时间

AsyncStorage time of creation

所以我使用

在我的应用程序中存储数据
AsyncStorage.setItem(key, value); 

我只是想知道如何存储添加此项的时间?我想添加一个功能来显示状态发布的时间。

我的问题是:人们使用什么方法来做到这一点?

当用户提交状态时,使用 Date.now(); to get the current time. Then save it with AsyncStorage. For displaying how long passed from post time, you can use timeago.js .