Java Date Format formatDate(Date d)

Here you can find the source of formatDate(Date d)

Description

format Date

License

Apache License

Declaration

public static String formatDate(Date d) 

Method Source Code

//package com.java2s;
/*// ww  w  . jav a2s.c om
 * Copyright (C) 2017 CenturyLink, Inc.
 *
 * 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.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static SimpleDateFormat _serviceDateFormat;

    public static String formatDate(Date d) {
        return serviceDateToString(d);
    }

    public static String serviceDateToString(Date d) {
        return d == null ? null : _serviceDateFormat.format(d);
    }
}

Related

  1. formatDate(Date d)
  2. formatDate(Date d)
  3. formatDate(Date d)
  4. formatDate(Date d)
  5. formatDate(Date d)
  6. formatDate(Date d)
  7. formatDate(Date d)
  8. formatDate(Date d)
  9. formatDate(Date d)