Java yyyy format(ResourceBundle idioma, Date date)

Here you can find the source of format(ResourceBundle idioma, Date date)

Description

format

License

Open Source License

Declaration

@Deprecated
    public static String format(ResourceBundle idioma, Date date) 

Method Source Code


//package com.java2s;
/*/*from w  ww  .ja  v  a 2 s.  c o m*/
 * Copyright (C) 2009-2015 SM2 SOFTWARE & SERVICES MANAGEMENT
 * 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 3 of the License, or
 * (at your option) any later version.
 *
 * This program has been created in the hope that it will be useful.
 * It is distributed WITHOUT ANY WARRANTY of any Kind,
 * 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, see http://www.gnu.org/licenses/.
 *
 * For more information, please contact SM2 Software & Services Management.
 * Mail: info@talaia-openppm.com
 * Web: http://www.talaia-openppm.com
 *
 * Module: utils
 * File: DateUtil.java
 * Create User: javier.hernandez
 * Create Date: 06/03/2015 14:35:37
 */

import java.text.SimpleDateFormat;
import java.util.*;

public class Main {
    @Deprecated
    public static String format(ResourceBundle idioma, Date date) {
        String str = "";
        if (date != null) {
            SimpleDateFormat df = new SimpleDateFormat(getDatePattern(idioma));
            str = df.format(date);
        }
        return str;
    }

    public static String format(String pattern, Date date) {
        String str = "";
        if (pattern != null && date != null) {
            SimpleDateFormat df = new SimpleDateFormat(pattern);
            str = df.format(date);
        }
        return str;
    }

    /**
     * Return Date Pattern for given idioma
     * @param idioma
     * @return
     */
    @Deprecated
    public static String getDatePattern(ResourceBundle idioma) {

        return "dd/MM/yyyy";
    }
}

Related

  1. format(final java.util.Date date, final String sFormat)
  2. format(java.util.Date date)
  3. format(java.util.Date date)
  4. format(java.util.Date date, String pattern)
  5. format(Object value, String pattern)
  6. format(String dateString)
  7. format(String oldPattern, String newPattern, String data)
  8. format2(Date data)
  9. format6chars(Date date)