@@ -91,17 +91,23 @@ public String describe() {
9191 }
9292 String secondsDesc = "" ;
9393 String minutesDesc = "" ;
94- final String hoursDesc = addTimeExpressions (describe (hours ), bundle .getString (HOUR ),
95- bundle .getString ("hours" ));
96- if (!(seconds instanceof On && isDefault ((On ) seconds ))) {
97- secondsDesc = addTimeExpressions (describe (seconds ), bundle .getString (SECOND ), bundle .getString ("seconds" ));
94+ String hoursDesc = "" ;
95+ if (!(hours instanceof Always )) {
96+ hoursDesc = addTimeExpressions (describe (hours ), bundle .getString (HOUR ), bundle .getString ("hours" ));
9897 }
99- if (!(minutes instanceof On && isDefault ((On ) minutes ))) {
98+ if (!(minutes instanceof On && isDefault ((On ) minutes )) && !(( minutes instanceof Always ) && ( hours instanceof Always )) ) {
10099 minutesDesc = addTimeExpressions (describe (minutes ), bundle .getString (MINUTE ), bundle .getString ("minutes" ));
101100 }
101+ if (!(seconds instanceof On && isDefault ((On ) seconds ))) {
102+ secondsDesc = addTimeExpressions (describe (seconds ), bundle .getString (SECOND ), bundle .getString ("seconds" ));
103+ }
102104 return String .format ("%s %s %s" , secondsDesc , minutesDesc , hoursDesc );
103105 }
104106
107+ protected String describe (final Always always , final boolean and ) {
108+ return describe (new Every (new IntegerFieldValue (1 )), and );
109+ }
110+
105111 private String addTimeExpressions (final String description , final String singular , final String plural ) {
106112 return description .replaceAll ("%s" , singular ).replaceAll ("replace_plural" , plural );
107113 }
0 commit comments