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