Here you can find the source of getToday()
public static java.util.Date getToday()
//package com.java2s; /**//from w ww . j a va 2s . c om * Copyright 2015 Jan Lolling jan.lolling@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.util.Date; public class Main { /** * getToday: returns today * @return Date with no time * * {talendTypes} Date * * {Category} TimestampUtil * * {example} getToday(). */ public static java.util.Date getToday() { return truncateToDay(new Date()); } /** * truncateToDay: returns the start of the given day. * * {Category} TimestampUtil * * {talendTypes} Date * * {param} Date() day: any day. * * {example} truncateToDay(TalendDate.getCurentDate()). */ public static java.util.Date truncateToDay(java.util.Date timestamp) { if (timestamp == null) return null; java.util.Calendar c = java.util.Calendar.getInstance(); c.setTime(timestamp); // cut time c.set(java.util.Calendar.MINUTE, 0); c.set(java.util.Calendar.SECOND, 0); c.set(java.util.Calendar.MILLISECOND, 0); c.set(java.util.Calendar.HOUR_OF_DAY, 0); return c.getTime(); } }