text: /*!
   * OpenUI5
   * (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["sap/base/Log","sap/ui/core/CalendarType","sap/ui/core/format/DateFormat","sap/ui/model/FormatException","sap/ui/model/ParseException","sap/ui/model/ValidateException","sap/ui/model/odata/type/ODataType","sap/ui/thirdparty/jquery"],function(t,e,a,n,r,o,i,s){"use strict";var u=/\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])/,l=(new Date).getFullYear()+"-12-31",f;function p(t){return sap.ui.getCore().getLibraryResourceBundle().getText("EnterDate",[t.formatValue(l,"string")])}function c(t){var e;if(!t.oFormat){e=s.extend({strictParsing:true},t.oFormatOptions);e.UTC=true;t.oFormat=a.getDateInstance(e)}return t.oFormat}function d(){if(!f){f=a.getDateInstance({calendarType:e.Gregorian,pattern:"yyyy-MM-dd",strictParsing:true,UTC:true})}return f}function m(e,a){var n;e.oConstraints=undefined;if(a){n=a.nullable;if(n===false||n==="false"){e.oConstraints={nullable:false}}else if(n!==undefined&&n!==true&&n!=="true"){t.warning("Illegal nullable: "+n,null,e.getName())}}}var g=i.extend("sap.ui.model.odata.type.Date",{constructor:function(t,e){i.apply(this,arguments);this.oFormatOptions=t;m(this,e)}});g.prototype._handleLocalizationChange=function(){this.oFormat=null};g.prototype.formatValue=function(t,e){var a;if(t===undefined||t===null){return null}switch(this.getPrimitiveType(e)){case"any":return t;case"object":return t instanceof Date?new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()):d().parse(t,false);case"string":a=t instanceof Date?t:d().parse(t);return a?c(this).format(a):t;default:throw new n("Don't know how to format "+this.getName()+" to "+e)}};g.prototype.getModelFormat=function(){return d()};g.prototype.getName=function(){return"sap.ui.model.odata.type.Date"};g.prototype.parseValue=function(t,e){var a;if(t===""||t===null){return null}switch(this.getPrimitiveType(e)){case"object":return d().format(t,false);case"string":a=c(this).parse(t);if(!a){throw new r(p(this))}return d().format(a);default:throw new r("Don't know how to parse "+this.getName()+" from "+e)}};g.prototype.validateValue=function(t){if(t===null){if(this.oConstraints&&this.oConstraints.nullable===false){throw new o(p(this))}}else if(typeof t!=="string"||!u.test(t)){throw new o("Illegal "+this.getName()+" value: "+t)}};g._resetModelFormatter=function(){f=undefined};return g});