zoukankan      html  css  js  c++  java
  • android 日历

    引用:http://www.eoeandroid.com/thread-83969-1-1.html

    private void setTime(){

                  StringBuilder buf = new StringBuilder();
                      CalendarUtil cu = new CalendarUtil();
                      String chineseMonth = cu.getChineseMonth(Integer.parseInt(getCurrentDate("yyyy")),
                                      Integer.parseInt(getCurrentDate("MM")), Integer.parseInt(getCurrentDate("dd")));
                      String chineseDay = cu.getChineseDay(Integer.parseInt(getCurrentDate("yyyy")),
                                      Integer.parseInt(getCurrentDate("MM")), Integer.parseInt(getCurrentDate("dd")));
                      buf.append("\n当前日期:").append(getCurrentDate("yyyy-MM-dd"));
                      buf.append("\n农历:").append(chineseMonth).append(chineseDay);
                      System.out.println(chineseDay+"=============="+chineseMonth);
                      Date d = new Date();
                      String h=d.getHours()+":"+d.getMinutes()+"   星期"+d.getDay();
                      buf.append("\n当前时间:").append(h);
                      tv.setText(buf);
        }

  • 相关阅读:
    Java异常处理和设计
    一次qps测试实践
    Alternate Task UVA
    Just Another Problem UVA
    Lattice Point or Not UVA
    Play with Floor and Ceil UVA
    Exploring Pyramids UVALive
    Cheerleaders UVA
    Triangle Counting UVA
    Square Numbers UVA
  • 原文地址:https://www.cnblogs.com/sode/p/2350194.html
Copyright © 2011-2022 走看看