C_DateTimeValue.js 2.1 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: cchl
  3. // (C) Copyright IBM Corp. 2003, 2016.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. function C_DateTimeValue(_c9O1, _cWB1, _cXB1, _cEW, _cTC){if(typeof _cXB1=="undefined"){_cXB1=C_ParameterValue._cX61;}this._cYB1=_cXB1;this._cFW=2;if(_cTC){this._cFW=0;}else if(_cEW){this._cFW=1;}this.F_ConstructBaseClass(_c9O1);if(_cWB1){this.F_SetUseValue(_cWB1);}};C_DateTimeValue.F_Extends(C_ParameterValue);C_DateTimeValue.prototype.F_SetUseValue=function(_cWB1,_cJR){if(_cWB1){if(_cWB1.match(/^(\d\d\d\d-\d\d-\d\d)[Tt\s](\d\d:\d\d:\d\d\.\d\d\d)\d*[Zz]?:(\d\d\d\d-\d\d-\d\d)[Tt\s](\d\d:\d\d:\d\d\.\d\d\d)\d*[Zz]?$/)){_cWB1=RegExp.$1+" " + RegExp.$2 + ":" + RegExp.$3 + " " + RegExp.$4;}else if(_cWB1.match(/^(\d\d\d\d-\d\d-\d\d)[Tt\s](\d\d:\d\d:\d\d\.\d\d\d)\d*[Zz]?$/)){_cWB1=RegExp.$1+" " + RegExp.$2;}}C_DateTimeValue.superClass.F_SetUseValue.call(this, _cWB1, _cJR);};C_DateTimeValue.prototype._cN3=function(_cNM){C_DateTimeValue.superClass._cN3.call(this, _cNM, "dateTime");};C_DateTimeValue.prototype._c3J=function(_cGN1){var _cO11;var _c5R1=U_PromptInputParser._cY61(_cGN1.match(/^\d\d\d\d-\d\d-\d\d/gi)[0], this._cYB1);var _c6R1=U_PromptInputParser._cZ61(U_PromptInputParser.F_ParseTime(_cGN1.match(/\d\d:\d\d:\d\d\.\d\d\d$/gi)[0]), this._cFW);if(_c5R1&&_c6R1){_cO11=_c5R1+" " + _c6R1;}return(_cO11?_cO11:null);};C_DateTimeValue.prototype._cKR=function(_cGN1){var _cO11=null;if(_cGN1&&_cGN1.match(/^\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d\.\d\d\d$/gi)){var _c7R1=U_PromptInputParser.F_ParseDate(_cGN1.match(/^\d\d\d\d-\d\d-\d\d/gi)[0], U_PromptInputParser._cDA);var _c8R1=U_PromptInputParser.F_ParseTime(_cGN1.match(/\d\d:\d\d:\d\d\.\d\d\d$/gi)[0]);if(_c7R1&&_c8R1){_cO11=U_PromptInputParser.F_GetDateInTransferableFormat( _c7R1)+ " " + U_PromptInputParser.F_GetTimeInTransferableFormat( _c8R1 );}}return(_cO11?_cO11:null);};C_DateTimeValue.prototype.F_SetDisplayProperties=function(_cXB1,_cEW,_cTC){this._cYB1=_cXB1;this._cFW=2;if(_cTC){this._cFW=0;}else if(_cEW){this._cFW=1;}this._cC2();};