Package org.ocpsoft.prettytime.format

Examples of org.ocpsoft.prettytime.format.SimpleTimeFormat


      }
    };
    t.clearUnits();
    t.registerUnit(
        unit,
        new SimpleTimeFormat().setSingularName("hitungan")
            .setPluralName("hitungan").setPattern("%n %u")
            .setRoundingTolerance(20).setFutureSuffix("... LARI!")
            .setFuturePrefix("hancur dalam: ")
            .setPastPrefix("telah hancur dalam: ")
            .setPastSuffix(""));
View Full Code Here


         {
            return 5000;
         }
      };
      t.clearUnits();
      t.registerUnit(unit, new SimpleTimeFormat()
      .setSingularName("tick").setPluralName("ticks")
      .setPattern("%n %u").setRoundingTolerance(20)
      .setFutureSuffix("... RUN!")
      .setFuturePrefix("self destruct in: ").setPastPrefix("self destruct was: ").setPastSuffix(
               " ago..."));
View Full Code Here

      }
    };
    t.clearUnits();
    t.registerUnit(
        unit,
        new SimpleTimeFormat().setSingularName("खेल")
            .setPluralName("खेल").setPattern("%n %u")
            .setRoundingTolerance(20).setFutureSuffix("होंगे ")
            .setFuturePrefix("भविष्य में ")
            .setPastPrefix("पहले ")
            .setPastSuffix("थे"));
View Full Code Here

         {
            return 5000;
         }
      };
      t.clearUnits();
      t.registerUnit(unit, new SimpleTimeFormat()
      .setSingularName("tick").setPluralName("ticks")
      .setPattern("%n %u").setRoundingTolerance(20)
      .setFutureSuffix("... RUN!")
      .setFuturePrefix("self destruct in: ").setPastPrefix("self destruct was: ").setPastSuffix(
               " ago..."));
View Full Code Here

         {
            return 5000;
         }
      };
      t.clearUnits();
      t.registerUnit(unit, new SimpleTimeFormat()
      .setSingularName("tick").setPluralName("ticks")
      .setPattern("%n %u").setRoundingTolerance(20)
      .setFutureSuffix("... RUN!")
      .setFuturePrefix("self destruct in: ").setPastPrefix("self destruct was: ").setPastSuffix(
               " ago..."));
View Full Code Here

         {
            return 5000;
         }
      };
      t.clearUnits();
      t.registerUnit(unit, new SimpleTimeFormat()
               .setSingularName("tick").setPluralName("ticks")
               .setPattern("%n %u").setRoundingTolerance(20)
               .setFutureSuffix("... RUN!")
               .setFuturePrefix("self destruct in: ").setPastPrefix("self destruct was: ").setPastSuffix(
                        " ago..."));
View Full Code Here

            {
                return 5000;
            }
        };
        t.clearUnits();
        t.registerUnit(unit, new SimpleTimeFormat()
                .setSingularName("tick").setPluralName("ticks")
                .setPattern("%n %u").setRoundingTolerance(20)
                .setFutureSuffix("... RUN!")
                .setFuturePrefix("self destruct in: ").setPastPrefix("self destruct was: ").setPastSuffix(
                        " ago..."));
View Full Code Here

         {
            return 5000;
         }
      };
      t.clearUnits();
      t.registerUnit(unit, new SimpleTimeFormat()
               .setSingularName("tick").setPluralName("ticks")
               .setPattern("%n %u").setRoundingTolerance(20)
               .setFutureSuffix("... RUN!")
               .setFuturePrefix("self destruct in: ").setPastPrefix("self destruct was: ").setPastSuffix(
                        " ago..."));
View Full Code Here

   @Test
   public void testDecorating() throws Exception
   {
      PrettyTime t = new PrettyTime();
      TimeFormat format = new SimpleTimeFormat().setFutureSuffix("from now").setPastSuffix("ago");

      Duration duration = t.approximateDuration(new Date(System.currentTimeMillis() + 1000));
      assertEquals("some time from now", format.decorate(duration, "some time"));

      duration = t.approximateDuration(new Date(System.currentTimeMillis() - 10000));
View Full Code Here

TOP

Related Classes of org.ocpsoft.prettytime.format.SimpleTimeFormat

Copyright © 2018 www.massapicom. 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.