Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.TimeZone;

public class Main {
    public static final long MILLISECONDS_PER_DAY = 1000L * 3600 * 24;

    public static int todayLocal() {
        return dayFrom_Milliseconds(System.currentTimeMillis() + TimeZone.getDefault().getRawOffset());
    }

    public static int dayFrom_Milliseconds(long milliseconds) {
        return (int) (milliseconds / MILLISECONDS_PER_DAY);
    }
}