001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.util;
016    
017    /**
018     * @author Brian Wing Shun Chan
019     */
020    public class DateUtil_IW {
021            public static DateUtil_IW getInstance() {
022                    return _instance;
023            }
024    
025            public int compareTo(java.util.Date date1, java.util.Date date2) {
026                    return DateUtil.compareTo(date1, date2);
027            }
028    
029            public boolean equals(java.util.Date date1, java.util.Date date2) {
030                    return DateUtil.equals(date1, date2);
031            }
032    
033            public java.lang.String formatDate(java.lang.String fromPattern,
034                    java.lang.String dateString, java.util.Locale locale)
035                    throws java.text.ParseException {
036                    return DateUtil.formatDate(fromPattern, dateString, locale);
037            }
038    
039            public java.lang.String getCurrentDate(java.lang.String pattern,
040                    java.util.Locale locale) {
041                    return DateUtil.getCurrentDate(pattern, locale);
042            }
043    
044            public java.lang.String getCurrentDate(java.lang.String pattern,
045                    java.util.Locale locale, java.util.TimeZone timeZone) {
046                    return DateUtil.getCurrentDate(pattern, locale, timeZone);
047            }
048    
049            public java.lang.String getDate(java.util.Date date,
050                    java.lang.String pattern, java.util.Locale locale) {
051                    return DateUtil.getDate(date, pattern, locale);
052            }
053    
054            public java.lang.String getDate(java.util.Date date,
055                    java.lang.String pattern, java.util.Locale locale,
056                    java.util.TimeZone timeZone) {
057                    return DateUtil.getDate(date, pattern, locale, timeZone);
058            }
059    
060            public int getDaysBetween(java.util.Date date1, java.util.Date date2) {
061                    return DateUtil.getDaysBetween(date1, date2);
062            }
063    
064            public int getDaysBetween(java.util.Date date1, java.util.Date date2,
065                    java.util.TimeZone timeZone) {
066                    return DateUtil.getDaysBetween(date1, date2, timeZone);
067            }
068    
069            public java.text.DateFormat getISO8601Format() {
070                    return DateUtil.getISO8601Format();
071            }
072    
073            public java.text.DateFormat getISOFormat() {
074                    return DateUtil.getISOFormat();
075            }
076    
077            public java.text.DateFormat getISOFormat(java.lang.String text) {
078                    return DateUtil.getISOFormat(text);
079            }
080    
081            public java.text.DateFormat getUTCFormat() {
082                    return DateUtil.getUTCFormat();
083            }
084    
085            public java.text.DateFormat getUTCFormat(java.lang.String text) {
086                    return DateUtil.getUTCFormat(text);
087            }
088    
089            public boolean isFormatAmPm(java.util.Locale locale) {
090                    return DateUtil.isFormatAmPm(locale);
091            }
092    
093            public java.util.Date newDate() {
094                    return DateUtil.newDate();
095            }
096    
097            public java.util.Date newDate(long date) {
098                    return DateUtil.newDate(date);
099            }
100    
101            public long newTime() {
102                    return DateUtil.newTime();
103            }
104    
105            public java.util.Date parseDate(java.lang.String dateString,
106                    java.util.Locale locale) throws java.text.ParseException {
107                    return DateUtil.parseDate(dateString, locale);
108            }
109    
110            public java.util.Date parseDate(java.lang.String pattern,
111                    java.lang.String dateString, java.util.Locale locale)
112                    throws java.text.ParseException {
113                    return DateUtil.parseDate(pattern, dateString, locale);
114            }
115    
116            private DateUtil_IW() {
117            }
118    
119            private static DateUtil_IW _instance = new DateUtil_IW();
120    }