- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 30 of file EventDates.java.
◆ eventFormat() [1/4]
static String org.turro.elephant.calendar.EventDates.eventFormat |
( |
CheckDate |
start, |
|
|
CheckDate |
end, |
|
|
String |
format |
|
) |
| |
|
static |
Definition at line 103 of file EventDates.java.
104 return String.format(Application.getUsedLocale(), format, start.getCalendar(), end.getCalendar());
◆ eventFormat() [2/4]
static String org.turro.elephant.calendar.EventDates.eventFormat |
( |
CheckDate |
start, |
|
|
String |
format |
|
) |
| |
|
static |
Definition at line 59 of file EventDates.java.
60 return String.format(Application.getUsedLocale(), format, start.getCalendar());
◆ eventFormat() [3/4]
static String org.turro.elephant.calendar.EventDates.eventFormat |
( |
Date |
date | ) |
|
|
static |
Definition at line 37 of file EventDates.java.
38 CheckDate cdDate =
new CheckDate(date);
39 Date now =
new Date();
40 if(cdDate.sameDay(now)) {
41 return String.format(Application.getUsedLocale(),
"%s, %s %3$tR",
42 I_.get(
"Today"), I_.get(
"At"),
43 cdDate.getCalendar());
44 }
else if(cdDate.addDays(1).sameDay(now)) {
45 return String.format(Application.getUsedLocale(),
"%s, %s %3$tR",
46 I_.get(
"Tomorrow"), I_.get(
"At"),
47 cdDate.getCalendar());
48 }
else if(cdDate.addDays(-1).sameDay(now)) {
49 return String.format(Application.getUsedLocale(),
"%s, %s %3$tR",
50 I_.get(
"Yesterday"), I_.get(
"At"),
51 cdDate.getCalendar());
53 return String.format(Application.getUsedLocale(),
"%2$tA, %2$td/%2$tm/%2$ty %s %2$tR",
55 cdDate.getCalendar());
◆ eventFormat() [4/4]
static String org.turro.elephant.calendar.EventDates.eventFormat |
( |
Date |
start, |
|
|
Date |
end |
|
) |
| |
|
static |
Definition at line 71 of file EventDates.java.
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)) {
77 return String.format(Application.getUsedLocale(),
"%s, %s %4$tR %s %5$tR",
79 I_.get(
"At"), I_.get(
"To"),
80 cdStart.getCalendar(), cdEnd.getCalendar());
81 }
else if(cdStart.addDays(1).sameDay(now)) {
82 return String.format(Application.getUsedLocale(),
"%s, %s %4$tR %s %5$tR",
84 I_.get(
"At"), I_.get(
"To"),
85 cdStart.getCalendar(), cdEnd.getCalendar());
86 }
else if(cdStart.addDays(-1).sameDay(now)) {
87 return String.format(Application.getUsedLocale(),
"%s, %s %4$tR %s %5$tR",
89 I_.get(
"At"), I_.get(
"To"),
90 cdStart.getCalendar(), cdEnd.getCalendar());
92 return String.format(Application.getUsedLocale(),
"%3$tA, %3$td/%3$tm/%3$ty %s %3$tR %s %4$tR",
93 I_.get(
"At"), I_.get(
"To"),
94 cdStart.getCalendar(), cdEnd.getCalendar());
97 return String.format(Application.getUsedLocale(),
"%s %3$td/%3$tm/%3$ty %3$tR %s %4$td/%4$tm/%4$ty %4$tR",
98 I_.get(
"From"), I_.get(
"To"),
99 cdStart.getCalendar(), cdEnd.getCalendar());
The documentation for this class was generated from the following file: