MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / goodWordForm

Method goodWordForm

src/main/java/ui/Time.java:234–249  ·  view source on GitHub ↗
(int d, int field)

Source from the content-addressed store, hash-verified

232 }
233
234 public static String goodWordForm (int d, int field) {
235 String [][] suf = {
236 {SR.MS_SEC1, SR.MS_SEC2, SR.MS_SEC3},
237 {SR.MS_MIN1, SR.MS_MIN2, SR.MS_MIN3},
238 {SR.MS_HOUR1, SR.MS_HOUR2, SR.MS_HOUR3},
239 {SR.MS_DAY1, SR.MS_DAY2, SR.MS_DAY3},
240 };
241 int index;
242 if ((d%100>10) && (d%100<20) || (d%10==0) || (d%10>4))
243 index=2;
244 else if ((d%10>1) && (d%10<5))
245 index=1;
246 else
247 index=0;
248 return suf[field][index];
249 }
250
251 public static String getTimeWeekDay() {
252 StringBuffer s=new StringBuffer(localWeekDay());

Callers 2

pingToStringMethod · 0.95
secDiffToDateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected