View Javadoc

1   // Created on 14.11.2003
2   package com.pnpconsult.zeiterfassung.util;
3   
4   import java.text.DateFormat;
5   import java.text.ParseException;
6   import java.util.Date;
7   
8   /***
9    * @author <a href="mailto:powerpete@users.sf.net">M. Petersen</a>
10   * @version $Id: Dates.java,v 1.1 2003/11/14 16:05:44 powerpete Exp $
11   */
12  public class Dates
13  {
14      private static final DateFormat FORMAT =
15          DateFormat.getDateInstance(DateFormat.MEDIUM);
16      
17      private Dates()
18      {}
19  
20      public static String format(Date date)
21      {
22          return FORMAT.format(date);
23      }
24  
25      public static Date parse(String str) throws ParseException
26      {
27          return FORMAT.parse(str);
28      }
29  }