19 package org.turro.elephant.calendar;
21 import java.util.Date;
22 import org.amic.util.date.CheckDate;
23 import org.turro.elephant.context.Application;
24 import org.turro.i18n.I_;
38 CheckDate cdDate =
new CheckDate(date);
39 Date now =
new Date();
40 if(cdDate.sameDay(now)) {
43 cdDate.getCalendar());
44 }
else if(cdDate.addDays(1).sameDay(now)) {
47 cdDate.getCalendar());
48 }
else if(cdDate.addDays(-1).sameDay(now)) {
51 cdDate.getCalendar());
55 cdDate.getCalendar());
59 public static String
eventFormat(CheckDate start, String format) {
72 CheckDate cdStart =
new CheckDate(start),
73 cdEnd =
new CheckDate(end);
74 Date now =
new Date();
75 if(cdStart.sameDay(end)) {
76 if(cdStart.sameDay(now)) {
80 cdStart.getCalendar(), cdEnd.getCalendar());
81 }
else if(cdStart.addDays(1).sameDay(now)) {
85 cdStart.getCalendar(), cdEnd.getCalendar());
86 }
else if(cdStart.addDays(-1).sameDay(now)) {
90 cdStart.getCalendar(), cdEnd.getCalendar());
94 cdStart.getCalendar(), cdEnd.getCalendar());
99 cdStart.getCalendar(), cdEnd.getCalendar());
103 public static String
eventFormat(CheckDate start, CheckDate end, String format) {
static String eventFormat(CheckDate start, CheckDate end, String format)
static String eventFormat(Date date)
static String eventFormat(CheckDate start, String format)
static String eventFormat(Date start, Date end)
static Locale getUsedLocale()
static String get(String msg)