java - 如何在java中获取Android应用程序开发中的特定日期?

标签 java android

Possible Duplicate:
Android: how to get the current day of the week (Monday, etc…) in user language?

我想在java中获取特定日期的日期用于android应用程序开发。 例如。周日 2011年8月7日 2011年8月14日 2011年8月21日

最佳答案

  Date date1 = (new GregorianCalendar(2011 , Calendar.AUGUST, 28)).getTime(); 
   Format formatter = new SimpleDateFormat("EEEE"); 
    String s = formatter.format(date1);  //  s==Sunday 

关于java - 如何在java中获取Android应用程序开发中的特定日期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7240249/

相关文章:

android - Activity 泄露了原本绑定(bind)在这里的 ServiceConnection com.google.android.youtube.player.internal.r$e@42201a30

java - 在 Android 中禁用相机

Java RegEx 检查行的第 8 个字符是否为 A

java - 如何创建 spring/spring-boot 库?

java - 带有正则表达式的 String.replaceAll() 搞砸了

安卓 XML : L shape text view

android - 多个dex文件用Gradle定义Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat

java - 如何管理Java中的依赖关系

java - https 和 http 之间的 session 没有得到维护

javascript - 将 JSON 存储和恢复到此 Ionic 应用程序的最有效方法?