Java Resource Message getMessageFormattedTime(Date date)

Here you can find the source of getMessageFormattedTime(Date date)

Description

get Message Formatted Time

License

Apache License

Declaration

public static String getMessageFormattedTime(Date date) 

Method Source Code


//package com.java2s;
/*//from   w  w w  .j a  v a  2 s  . co  m
 *
 *
 * Copyright 2016 Symphony Communication Services, LLC
 *
 * Licensed to Symphony Communication Services, LLC under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final SimpleDateFormat messageTimeFormatter = new SimpleDateFormat("HH:mm zzz");

    public static String getMessageFormattedTime(Date date) {
        return messageTimeFormatter.format(date);
    }
}

Related

  1. getMessage(String messageKey, Object[] params)
  2. getMessage(String pkg, String name, Object[] args)
  3. getMessage(String value, Object... args)
  4. getMessageCreateTime()
  5. getMessageFormat(final String bundleKey, final String messageKey, final Locale locale)
  6. getMessageNoKey(String messageName)
  7. getMessages(final Class cls)
  8. getMessageString(String bundleName, String key, Object[] params, Locale locale)
  9. getMessageString(String key, Locale locale)