我正在使用以下游标查询 SMS 数据库:
Uri uri = Uri.parse("content://mms-sms/conversations?simple=true");
Cursor cursor = _context.getApplicationContext().getContentResolver().query(uri, null, null, null, "normalized_date desc");
我正在找回日期,但它们以数字格式返回。现在我知道我可以使用以下内容:
SimpleDateFormat dateFormatted = new SimpleDateFormat("hh:mm")
并让所有时间都返回我选择的任何格式,但我想知道是否有更简单的方法来确定时间戳是从今天开始、本周早些时候还是过去一周前?或者另一种更容易让我确定的方法?