简体   繁体   中英

How to add time when I add a job in my Todo App?

I want to add time when I add a job. (I use ReactNative) (like time when you send a message in Facebook)

use new Date().toISOString() to get the current date time in ISO format when you add a job and store it in your database or wherever you store your data.

and then use moment.js to display the date or time according to your desired format

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM