Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.text.format.Time;

public class Main {

    public static boolean isThisYear(long when) {
        Time time = new Time();
        time.set(when);

        int thenYear = time.year;
        //      int thenMonth = time.month;
        int thenMonthDay = time.monthDay;

        time.set(System.currentTimeMillis());
        return (thenYear == time.year) && (thenMonthDay != time.monthDay);
    }
}