/** * @see CommonTS#setDatePrecision(int, int, int) * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public void setDatePrecision(int yr, int mnth, int dy) throws DataTypeException { getDetail().setDatePrecision(yr,mnth,dy); }
/** * @see CommonTS#setDatePrecision(int, int, int) * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public void setDatePrecision(int yr, int mnth, int dy) throws DataTypeException { getDetail().setDatePrecision(yr,mnth,dy); }
/** * This method takes in integer values for the year, month, day, hour * and minute and performs validations, it then sets the value in the object * formatted as an HL7 Time Stamp value with year&month&day&hour&minute precision (YYYYMMDDHHMM). */ public void setDateMinutePrecision(int yr, int mnth, int dy, int hr, int min) throws DataTypeException { try { //set the value of the date object to the input date value this.setDatePrecision(yr, mnth, dy); //create new time object is there isn't one if (tm == null) { tm = new CommonTM(); } //set the value of the time object to the minute precision with the input values tm.setHourMinutePrecision(hr, min); } //end try catch (DataTypeException e) { throw e; } //end catch catch (Exception e) { throw new DataTypeException(e); } //end catch } //end method
/** * This method takes in integer values for the year, month, day, hour * and minute and performs validations, it then sets the value in the object * formatted as an HL7 Time Stamp value with year&month&day&hour&minute precision (YYYYMMDDHHMM). */ public void setDateMinutePrecision(int yr, int mnth, int dy, int hr, int min) throws DataTypeException { try { //set the value of the date object to the input date value this.setDatePrecision(yr, mnth, dy); //create new time object is there isn't one if (tm == null) { tm = new CommonTM(); } //set the value of the time object to the minute precision with the input values tm.setHourMinutePrecision(hr, min); } //end try catch (DataTypeException e) { throw e; } //end catch catch (Exception e) { throw new DataTypeException(e); } //end catch } //end method
/** * This method takes in integer values for the year, month, day, hour, minute, seconds, * and fractional seconds (going to the tenthousandths precision). * The method performs validations and then sets the value in the object formatted as an * HL7 time value with a precision that starts from the year and goes down to the tenthousandths * of a second (YYYYMMDDHHMMSS.SSSS). * The Gmt Offset will not be effected. * Note: all of the precisions from tenths down to * tenthousandths of a second are optional. If the precision goes below tenthousandths * of a second then the second value will be rounded to the nearest tenthousandths of a second. */ public void setDateSecondPrecision(int yr, int mnth, int dy, int hr, int min, float sec) throws DataTypeException { try { //set the value of the date object to the input date value this.setDatePrecision(yr, mnth, dy); //create new time object is there isn't one if (tm == null) { tm = new CommonTM(); } //set the value of the time object to the second precision with the input values tm.setHourMinSecondPrecision(hr, min, sec); } //end try catch (DataTypeException e) { throw e; } //end catch catch (Exception e) { throw new DataTypeException(e); } //end catch } //end method
/** * This method takes in integer values for the year, month, day, hour, minute, seconds, * and fractional seconds (going to the tenthousandths precision). * The method performs validations and then sets the value in the object formatted as an * HL7 time value with a precision that starts from the year and goes down to the tenthousandths * of a second (YYYYMMDDHHMMSS.SSSS). * The Gmt Offset will not be effected. * Note: all of the precisions from tenths down to * tenthousandths of a second are optional. If the precision goes below tenthousandths * of a second then the second value will be rounded to the nearest tenthousandths of a second. */ public void setDateSecondPrecision(int yr, int mnth, int dy, int hr, int min, float sec) throws DataTypeException { try { //set the value of the date object to the input date value this.setDatePrecision(yr, mnth, dy); //create new time object is there isn't one if (tm == null) { tm = new CommonTM(); } //set the value of the time object to the second precision with the input values tm.setHourMinSecondPrecision(hr, min, sec); } //end try catch (DataTypeException e) { throw e; } //end catch catch (Exception e) { throw new DataTypeException(e); } //end catch } //end method