1
22
23 package com.liferay.portal.kernel.util;
24
25 import java.text.Format;
26
27 import java.util.Locale;
28 import java.util.TimeZone;
29
30
35 public class FastDateFormatFactoryUtil {
36
37 public static Format getDate(Locale locale) {
38 return getFastDateFormatFactory().getDate(locale);
39 }
40
41 public static Format getDate(Locale locale, TimeZone timeZone) {
42 return getFastDateFormatFactory().getDate(locale, timeZone);
43 }
44
45 public static Format getDate(TimeZone timeZone) {
46 return getFastDateFormatFactory().getDate(timeZone);
47 }
48
49 public static Format getDateTime(Locale locale) {
50 return getFastDateFormatFactory().getDateTime(locale);
51 }
52
53 public static Format getDateTime(Locale locale, TimeZone timeZone) {
54 return getFastDateFormatFactory().getDateTime(locale, timeZone);
55 }
56
57 public static Format getDateTime(TimeZone timeZone) {
58 return getFastDateFormatFactory().getDateTime(timeZone);
59 }
60
61 public static FastDateFormatFactory getFastDateFormatFactory() {
62 return _fastDateFormatFactory;
63 }
64
65 public static Format getSimpleDateFormat(String pattern) {
66 return getFastDateFormatFactory().getSimpleDateFormat(pattern);
67 }
68
69 public static Format getSimpleDateFormat(
70 String pattern, Locale locale) {
71
72 return getFastDateFormatFactory().getSimpleDateFormat(pattern, locale);
73 }
74
75 public static Format getSimpleDateFormat(
76 String pattern, Locale locale, TimeZone timeZone) {
77
78 return getFastDateFormatFactory().getSimpleDateFormat(
79 pattern, locale, timeZone);
80 }
81
82 public static Format getSimpleDateFormat(
83 String pattern, TimeZone timeZone) {
84
85 return getFastDateFormatFactory().getSimpleDateFormat(
86 pattern, timeZone);
87 }
88
89 public static Format getTime(Locale locale) {
90 return getFastDateFormatFactory().getTime(locale);
91 }
92
93 public static Format getTime(Locale locale, TimeZone timeZone) {
94 return getFastDateFormatFactory().getTime(locale, timeZone);
95 }
96
97 public static Format getTime(TimeZone timeZone) {
98 return getFastDateFormatFactory().getTime(timeZone);
99 }
100
101 public void setFastDateFormatFactory(
102 FastDateFormatFactory fastDateFormatFactory) {
103
104 _fastDateFormatFactory = fastDateFormatFactory;
105 }
106
107 private static FastDateFormatFactory _fastDateFormatFactory;
108
109 }