net.sourceforge.atunes.utils
Class DateUtils

java.lang.Object
  extended by net.sourceforge.atunes.utils.DateUtils

public class DateUtils
extends java.lang.Object

The Class DateUtils.


Constructor Summary
DateUtils()
           
 
Method Summary
static java.util.Calendar getCalendar()
          Returns a Calendar instance.
static int getCurrentYear()
          Returns the current year.
static java.util.Date parseRFC3339Date(java.lang.String dateStr)
          Parses a RFC 3339 date string.
static java.util.Date parseRFC822Date(java.lang.String dateString)
          Parses a RFC 822 date string.
static void setLocale(java.util.Locale l)
          Sets the locale.
static java.lang.String toPathString(java.util.Date objDate)
          Returns a String with locale representation of Date, replacing / for -.
static java.lang.String toString(java.util.Date objDate)
          Returns a String with locale representation of Date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateUtils

public DateUtils()
Method Detail

getCalendar

public static java.util.Calendar getCalendar()
Returns a Calendar instance.

Returns:
a Calendar instance

getCurrentYear

public static int getCurrentYear()
Returns the current year.

Returns:
the current year

parseRFC3339Date

public static java.util.Date parseRFC3339Date(java.lang.String dateStr)
Parses a RFC 3339 date string.

Parameters:
dateStr - A RFC 3339 date as string
Returns:
The accordant java.util.Date object or null if the date couldn't be parsed

parseRFC822Date

public static java.util.Date parseRFC822Date(java.lang.String dateString)
Parses a RFC 822 date string.

Parameters:
dateString - A RFC 822 date as string
Returns:
The accordant java.util.Date object or null if the date couldn't be parsed

setLocale

public static void setLocale(java.util.Locale l)
Sets the locale.

Parameters:
l - the new locale

toPathString

public static java.lang.String toPathString(java.util.Date objDate)
Returns a String with locale representation of Date, replacing / for -.

Parameters:
objDate - the obj date
Returns:
the string

toString

public static java.lang.String toString(java.util.Date objDate)
Returns a String with locale representation of Date.

Parameters:
objDate - the obj date
Returns:
the string


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.