public class

DateUtils

extends Object
java.lang.Object
   ↳ com.neomades.util.DateUtils

Class Overview

A utility class for parsing and formatting date.

Summary

Public Constructors
DateUtils()
Public Methods
static String formatDate(Date date)
Formats the given date according to the RFC 1123 pattern.
static Date parseDate(String dateValue)
Parses a date value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DateUtils ()

Public Methods

public static String formatDate (Date date)

Formats the given date according to the RFC 1123 pattern.

Parameters
date The date to format.
Returns
  • An RFC 1123 formatted date string.

public static Date parseDate (String dateValue)

Parses a date value. The formats used for parsing the date value must follow RFC 1123 pattern.

Parameters
dateValue dateValue the date value to parse
Returns
  • the parsed date or null if input could not be parsed