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;
//License from project: Open Source License 

import java.util.*;

public class Main {
    /**/*from   w  w w  . j  a  v  a 2 s.  c  om*/
     * Used for testing-purposes of the scheduling algorithm, where it is sometimes necessary to hack the value of
     * 'today'.
     */
    public static Date testToday;

    public static Date getToday() {
        if (testToday != null)
            return testToday;

        return new Date(System.currentTimeMillis());
    }
}

Related

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