Java Today getTodayLastUpdateTimeFormat()

Here you can find the source of getTodayLastUpdateTimeFormat()

Description

Returns time format used in status bar.

License

Open Source License

Return

time format used in status bar

Declaration

public static DateFormat getTodayLastUpdateTimeFormat() 

Method Source Code

//package com.java2s;
/*//w w  w.  j  a v  a2  s  . c om
 * JStock - Free Stock Market Software
 * Copyright (C) 2012 Yan Cheng CHEOK <yccheok@yahoo.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

import java.text.DateFormat;

import java.text.SimpleDateFormat;

public class Main {
    private static final ThreadLocal<DateFormat> todayLastUpdateTimeFormat = new ThreadLocal<DateFormat>() {
        @Override
        protected DateFormat initialValue() {
            return new SimpleDateFormat("h:mm a");
        }
    };

    /**
     * Returns time format used in status bar.
     * 
     * @return time format used in status bar
     */
    public static DateFormat getTodayLastUpdateTimeFormat() {
        return todayLastUpdateTimeFormat.get();
    }
}

Related

  1. getTodayInFormat(String format)
  2. getTodayIntevalDays(String date)
  3. getTodayLast()
  4. getTodayLastSecond()
  5. getTodayLastSecond()
  6. getTodayLimit()
  7. getTodayMidnight()
  8. getTodayMin()
  9. getTodayNight()