Java Today getToday()

Here you can find the source of getToday()

Description

get Today

License

Open Source License

Declaration

public static Date getToday() 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

import java.util.TimeZone;

public class Main {
    private static final TimeZone timeZone = TimeZone.getTimeZone("GMT+8");

    public static Date getToday() {
        Calendar c = Calendar.getInstance();
        c.setTimeZone(timeZone);/*from w  ww.  j a  va  2 s  . c  o m*/
        c.set(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
        return c.getTime();
    }
}

Related

  1. getStartOfToday()
  2. getStringToday()
  3. getTimeNumberToday()
  4. getToday()
  5. getToday()
  6. getToday()
  7. getToday()
  8. getToday()
  9. getToday()