(Android) Getting Current Date and Time

'中国农历计算程式' tutorial was cited in a cnblogs.com post in 2013

The 中国农历计算程式 tutorial was cited in a cnblogs.com post in 2013.

Subject: (Android) 获得当前时间的方法
Date: Jan 25, 2013
Author: 732003684
Source: http://www.cnblogs.com/ct732003684/archive/2013/01/25

获得当前时间的方法有两种1、calendar 2、Date类实现

package com.ct.time;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import android.R.integer;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */


package com.ct.time;
 * ChineseCalendarGB.java Copyright (c) 1997-2002 by Dr. Herong Yang 
 * 中国农历算法 -
 * 实用于公历 1901 年至 2100 年之间的 200 年
public class CalendarUtil {
    private int gregorianYear;
    private int gregorianMonth;
    private int gregorianDate;
    private boolean isGregorianLeap;
    private int dayOfYear;
    private int dayOfWeek; // 周日一星期的第一天
    private int chineseYear;
    private int chineseMonth; // 负数表示闰月
    private int chineseDate;
    private int sectionalTerm;
    private int principleTerm;


Table of Contents

 About This Book

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

Reference Citations in 2013

(Android) Getting Current Date and Time

 Deatil View with other language

 Ordering and Installing SSL

 JDK (JBoss/Tomcat) SSL Issue

 Web-palveluiden koostaminen: web- ja RESTful-palvelut

 Corso di Architetture Orientate ai Servizi

 Hardening a SAS Installation on a multi tier installation on Linux

 [scala-user] for-loops still not optimized in 2.10?

 .bin/.cue - the purpose of .cue?

 (horror movie) com.hellogood.eCalendar

 Using keytool to convert bks file to p12

 Error while using LWP::Socket to send XML Data

 jdk 1.7 keytool doesn't save

 Distributed Key System Broken Up Over Multiple Nodes

 Upgrading to a Mantis UTF8

 Cant receive MMS with wifi turned on

 Including and using the MySql.Data.dll on your web host server

 Spring Download (in Korean)

 Android Data Storage Folders

 Distributed Key Systems: Enhancing Security...

 WP Spreadplugin Basket not shown

 How do you get multiple resultset from a single CallableStatement?

 Blowfish Cipher Algorithm in Java

 Harmonics Systems for Time Mining

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003

 PDF Printing Version