Java Today getToday()

Here you can find the source of getToday()

Description

get Today

License

Apache License

Declaration

public static Date getToday() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static final String APPLICATION_TIME_ZONE = "Europe/London";

    public static Date getToday() {
        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(APPLICATION_TIME_ZONE));
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);

        return cal.getTime();
    }// ww w  .j  a v a 2  s  .  c o m
}

Related

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