Examples of pluralize()


Examples of er.ajax.example2.helper.StringHelper.pluralize()

    int days;
    int hours;
    int minutes;

    if (years > 1) {
      String year_label = helper.pluralize("year", years);
      results.append(years + " " + year_label);
    }
    else {
      months = DateUtils.difference(time, baseTime, Calendar.MONTH) - 1;
      if (months > 11) {
View Full Code Here

Examples of er.ajax.example2.helper.StringHelper.pluralize()

      months = DateUtils.difference(time, baseTime, Calendar.MONTH) - 1;
      if (months > 11) {
        results.append("about 1 year ago");
      }
      else if (months > 1) {
        String month_label = helper.pluralize("month", months);
        results.append(months + " " + month_label);
      }
      else {
        days = DateUtils.difference(time, baseTime, Calendar.DAY_OF_YEAR) - 1;
        if (days > 25) {
View Full Code Here

Examples of er.ajax.example2.helper.StringHelper.pluralize()

        if (days > 25) {
          results.append("about 1 month");
        }
        else if (days > 7) {
          int weeks = days / 7;
          String weeks_label = helper.pluralize("week", weeks);
          results.append(weeks + " " + weeks_label);
        }
        else if (days > 1) {
          if (days <= 2) {
            hours = DateUtils.difference(time, baseTime, Calendar.HOUR_OF_DAY) - 1;
View Full Code Here

Examples of er.ajax.example2.helper.StringHelper.pluralize()

            hours = DateUtils.difference(time, baseTime, Calendar.HOUR_OF_DAY) - 1;
            if (hours < 30) {
              results.append("about 1 day");
            }
            else {
              String days_label = helper.pluralize("day", days);
              results.append(days + " " + days_label);
            }
          }
          else {
            String days_label = helper.pluralize("day", days);
View Full Code Here

Examples of er.ajax.example2.helper.StringHelper.pluralize()

              String days_label = helper.pluralize("day", days);
              results.append(days + " " + days_label);
            }
          }
          else {
            String days_label = helper.pluralize("day", days);
            results.append(days + " " + days_label);
          }
        }
        else {
          hours = DateUtils.difference(time, baseTime, Calendar.HOUR_OF_DAY) - 1;
View Full Code Here

Examples of er.ajax.example2.helper.StringHelper.pluralize()

          hours = DateUtils.difference(time, baseTime, Calendar.HOUR_OF_DAY) - 1;
          if (hours >= 20) {
            results.append("about 1 day");
          }
          else if (hours > 1) {
            String hours_label = helper.pluralize("hour", hours);
            results.append(hours + " " + hours_label);
          }
          else {
            minutes = DateUtils.difference(time, baseTime, Calendar.MINUTE) - 1;
            if (minutes >= 45) {
View Full Code Here

Examples of er.ajax.example2.helper.StringHelper.pluralize()

            }
            else if (minutes > 20 && minutes < 45) {
              results.append("about half an hour");
            }
            else if (minutes > 1) {
              String minutes_label = helper.pluralize("minute", minutes);
              results.append(minutes + " " + minutes_label);
            }
            else {
              return "this very minute";
            }
View Full Code Here

Examples of org.apache.cxf.binding.http.strategy.EnglishInflector.pluralize()

import org.apache.cxf.binding.http.strategy.Inflector;

public class InflectorTest extends TestCase {
    public void testPluralization() {
        Inflector i = new EnglishInflector();
        assertEquals("quizzes", i.pluralize("quiz"));
        assertEquals("QUIZzes", i.pluralize("QUIZ"));
        assertEquals("matrices", i.pluralize("matrix"));
        assertEquals("people", i.pluralize("person"));
        assertEquals("kids", i.pluralize("kid"));
        assertEquals("bashes", i.pluralize("bash"));
View Full Code Here

Examples of org.apache.cxf.binding.http.strategy.EnglishInflector.pluralize()

public class InflectorTest extends TestCase {
    public void testPluralization() {
        Inflector i = new EnglishInflector();
        assertEquals("quizzes", i.pluralize("quiz"));
        assertEquals("QUIZzes", i.pluralize("QUIZ"));
        assertEquals("matrices", i.pluralize("matrix"));
        assertEquals("people", i.pluralize("person"));
        assertEquals("kids", i.pluralize("kid"));
        assertEquals("bashes", i.pluralize("bash"));
    }
View Full Code Here

Examples of org.apache.cxf.binding.http.strategy.EnglishInflector.pluralize()

public class InflectorTest extends TestCase {
    public void testPluralization() {
        Inflector i = new EnglishInflector();
        assertEquals("quizzes", i.pluralize("quiz"));
        assertEquals("QUIZzes", i.pluralize("QUIZ"));
        assertEquals("matrices", i.pluralize("matrix"));
        assertEquals("people", i.pluralize("person"));
        assertEquals("kids", i.pluralize("kid"));
        assertEquals("bashes", i.pluralize("bash"));
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.