org.jbudget.util
Class DateFormater

java.lang.Object
  extended by org.jbudget.util.DateFormater

public class DateFormater
extends java.lang.Object

Utilities for formating objects rlated to dates.

Author:
petrov

Field Summary
private  java.util.Calendar calendar
           
private  java.lang.String[] monthStrings
           
private  java.lang.String[] shortMonthStrings
           
private  java.lang.String[] shortWeekdayStrings
           
private  java.lang.String[] weekdayStrings
           
 
Constructor Summary
DateFormater()
          Creates a new instance of DateFormater
DateFormater(java.util.Locale locale)
          Creates a new instance of DateFormater
 
Method Summary
 java.lang.String formatMonth(int month)
          Returns a string representation of a month
 java.lang.String formatMonthShort(int month)
          Returns a string representation of a month
 java.lang.String formatWeekday(int day)
          Returns a string representation of a week day
 java.lang.String formatWeekdayShort(int day)
          Returns a string representation of a week day
 int parseMonth(java.lang.String str)
          Parses a string representation of a month
 int parseWeekday(java.lang.String str)
          Parses a string representation of a weekday
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

monthStrings

private final java.lang.String[] monthStrings

shortMonthStrings

private final java.lang.String[] shortMonthStrings

weekdayStrings

private final java.lang.String[] weekdayStrings

shortWeekdayStrings

private final java.lang.String[] shortWeekdayStrings

calendar

private final java.util.Calendar calendar
Constructor Detail

DateFormater

public DateFormater()
Creates a new instance of DateFormater


DateFormater

public DateFormater(java.util.Locale locale)
Creates a new instance of DateFormater

Method Detail

formatMonth

public java.lang.String formatMonth(int month)
Returns a string representation of a month


formatMonthShort

public java.lang.String formatMonthShort(int month)
Returns a string representation of a month


parseMonth

public int parseMonth(java.lang.String str)
               throws java.text.ParseException
Parses a string representation of a month

Throws:
java.text.ParseException

formatWeekday

public java.lang.String formatWeekday(int day)
Returns a string representation of a week day


formatWeekdayShort

public java.lang.String formatWeekdayShort(int day)
Returns a string representation of a week day


parseWeekday

public int parseWeekday(java.lang.String str)
                 throws java.text.ParseException
Parses a string representation of a weekday

Throws:
java.text.ParseException