---
title: "android 中好用的时间工具-DateUtils"
author: "mjbb"
date: "2010-10-14T11:07:50Z"
tags: []
categories: ["编程语言"]
slug: "android-dateutils"
draft: false
lastmod: "2010-10-14T11:07:50Z"
id: 784580
url: "https://mjbb.iteye.com/blog/784580"
---

```java
DateUtils.isToday(timeMills) ? 
DateFormat.getTimeFormat(ctx).format(date) : 
DateFormat.getDateFormt(ctx).format(date);
```