如何在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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章