1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.util;
16  
17  import com.liferay.portal.kernel.util.CalendarFactory;
18  
19  import java.util.Calendar;
20  import java.util.GregorianCalendar;
21  import java.util.Locale;
22  import java.util.TimeZone;
23  
24  /**
25   * <a href="CalendarFactoryImpl.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   */
29  public class CalendarFactoryImpl implements CalendarFactory {
30  
31      public Calendar getCalendar() {
32          return new GregorianCalendar();
33      }
34  
35      public Calendar getCalendar(int year, int month, int date) {
36          return new GregorianCalendar(year, month, date);
37      }
38  
39      public Calendar getCalendar(
40          int year, int month, int date, int hour, int minute) {
41  
42          return new GregorianCalendar(year, month, date, hour, minute);
43      }
44  
45      public Calendar getCalendar(
46          int year, int month, int date, int hour, int minute, int second) {
47  
48          return new GregorianCalendar(year, month, date, hour, minute, second);
49      }
50  
51      public Calendar getCalendar(Locale locale) {
52          return new GregorianCalendar(locale);
53      }
54  
55      public Calendar getCalendar(TimeZone timeZone) {
56          return new GregorianCalendar(timeZone);
57      }
58  
59      public Calendar getCalendar(TimeZone timeZone, Locale locale) {
60          return new GregorianCalendar(timeZone, locale);
61      }
62  
63  }