如何在android中找到今天或昨天的時間 - How to find time is today or yesterday in android

問題:

Iam developing an application for sending sms.我正在開發一個發送短信的應用程序。 Iam storing the current time and showing in the sent history page by retrieving the time from the database.我通過從數據庫中檢索時間來存儲當前時間並顯示在發送的歷史記錄頁面中。 In the sent history page i want to display the time of the message was sent.在發送歷史記錄頁面中,我想顯示發送消息的時間。 Here i want to check that the message has been sent today or yesterday or the yesterday before like that.在這裏,我想檢查消息是否已在今天或昨天或昨天之前發送。 If the message was sent yesterday means then i need to display "Yesterday 20:00" like that and even the message was sent yesterday before means "Monday 20:00".如果消息是昨天發送的,那麼我需要像這樣顯示“昨天 20:00”,甚至昨天發送的消息也意味着“星期一 20:00”。 I dont know how it has to be done.我不知道它必須如何完成。 Please help me if anybody knows.如果有人知道,請幫助我。


解決方案:

參考: https://stackoom.com/en/question/rmjP
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章