BrightSide Workbench Full Report + Source Code
org.turro.elephant.calendar.EventDates Class Reference

Static Public Member Functions

static String eventFormat (Date date)
 
static String eventFormat (CheckDate start, String format)
 
static String eventFormat (Date start, Date end)
 
static String eventFormat (CheckDate start, CheckDate end, String format)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 30 of file EventDates.java.

Member Function Documentation

◆ 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.

103  {
104  return String.format(Application.getUsedLocale(), format, start.getCalendar(), end.getCalendar());
105  }
Here is the call graph for this function:

◆ eventFormat() [2/4]

static String org.turro.elephant.calendar.EventDates.eventFormat ( CheckDate  start,
String  format 
)
static

Definition at line 59 of file EventDates.java.

59  {
60  return String.format(Application.getUsedLocale(), format, start.getCalendar());
61  }
Here is the call graph for this function:

◆ eventFormat() [3/4]

static String org.turro.elephant.calendar.EventDates.eventFormat ( Date  date)
static

Definition at line 37 of file EventDates.java.

37  {
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());
52  } else {
53  return String.format(Application.getUsedLocale(), "%2$tA, %2$td/%2$tm/%2$ty %s %2$tR",
54  I_.get("At"),
55  cdDate.getCalendar());
56  }
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eventFormat() [4/4]

static String org.turro.elephant.calendar.EventDates.eventFormat ( Date  start,
Date  end 
)
static

Definition at line 71 of file EventDates.java.

71  {
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",
78  I_.get("Today"),
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",
83  I_.get("Tomorrow"),
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",
88  I_.get("Yesterday"),
89  I_.get("At"), I_.get("To"),
90  cdStart.getCalendar(), cdEnd.getCalendar());
91  } else {
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());
95  }
96  } else {
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());
100  }
101  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: