Package org.joda.time

Examples of org.joda.time.MutableDateTime.toDate()


        {
          date.setMillis(getMillis(zone, TimeZone.getDefault(), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here


      {
        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      dt.setZone(getTimeZone());
      return dt.toDate();
    }
    else
    {
      try
      {
View Full Code Here

        {
          date.setMillis(getMillis(zone, TimeZone.getDefault(), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

        {
          date.setMillis(getMillis(zone, TimeZone.getDefault(), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

        {
          date.setMillis(getMillis(zone, TimeZone.getDefault(), date.getMillis()));
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

      {
        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      dt.setZone(getTimeZone());
      return dt.toDate();
    }
    else
    {
      try
      {
View Full Code Here

        {
          date.set(DateTimeFieldType.halfdayOfDay(), amOrPm == AM_PM.PM ? 1 : 0);
        }

        // the date will be in the server's timezone
        setConvertedInput(date.toDate());
      }
      catch (RuntimeException e)
      {
        DateTimeField.this.error(e.getMessage());
        invalid();
View Full Code Here

        modelObject = changeTimeZone(modelObject, zone);
      }

      MutableDateTime mDate = new MutableDateTime(modelObject);

      date = mDate.toDate();

      if (use12HourFormat)
      {
        int hourOfHalfDay = mDate.get(DateTimeFieldType.hourOfHalfday());
        hours = hourOfHalfDay == 0 ? 12 : hourOfHalfDay;
View Full Code Here

        modelObject = changeTimeZone(modelObject, zone);
      }

      MutableDateTime mDate = new MutableDateTime(modelObject);

      date = mDate.toDate();

      if (use12HourFormat)
      {
        int hourOfHalfDay = mDate.get(DateTimeFieldType.hourOfHalfday());
        hours = hourOfHalfDay == 0 ? 12 : hourOfHalfDay;
View Full Code Here

        modelObject = changeTimeZone(modelObject, zone);
      }

      MutableDateTime mDate = new MutableDateTime(modelObject);

      date = mDate.toDate();

      if (use12HourFormat)
      {
        int hourOfHalfDay = mDate.get(DateTimeFieldType.hourOfHalfday());
        hours = hourOfHalfDay == 0 ? 12 : hourOfHalfDay;
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.