Java Date Convert dateToRRNDate(Date date)

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

Description

date To RRN Date

License

Open Source License

Declaration

public static String dateToRRNDate(Date date) 

Method Source Code

//package com.java2s;
/*//from   ww  w. ja  v a 2s  .  co  m
 * eID Middleware Project.
 * Copyright (C) 2010-2013 FedICT.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version
 * 3.0 as published by the Free Software Foundation.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, see
 * http://www.gnu.org/licenses/.
 */

import java.util.Calendar;

import java.util.Date;

public class Main {
    private static final String[] RRNMonthNames = { "JAN", "FEB", "MAAR",
            "APR", "MEI", "JUN", "JUL", "AUG", "SEP", "OKT", "NOV", "DEC" };

    public static String dateToRRNDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        StringBuilder builder = new StringBuilder();

        builder.append(calendar.get(Calendar.DAY_OF_MONTH));
        builder.append(' ');
        builder.append(RRNMonthNames[calendar.get(Calendar.MONTH)]);
        builder.append(' ');
        builder.append(calendar.get(Calendar.YEAR));
        return builder.toString();
    }
}

Related

  1. dateToLong(final Date date)
  2. DateToMask(Date javaDateType)
  3. dateToMorining(Date date)
  4. dateToNumber(Date date)
  5. dateToQTime(final Date date)
  6. DateToStr(java.util.Date val)
  7. dateToString(Date date)
  8. dateToString(Date date)
  9. dateToString(Date date)