diff --git a/UI/WebServerResources/js/Common/utils.js b/UI/WebServerResources/js/Common/utils.js index e300bad2c..c355c5791 100644 --- a/UI/WebServerResources/js/Common/utils.js +++ b/UI/WebServerResources/js/Common/utils.js @@ -113,31 +113,6 @@ String.prototype.formatted = function() { return newString; }; -String.prototype.formatTime = function(hours, minutes) { - var newString = this; - - // See http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSCalendarDate.html#method$NSCalendarDate-descriptionWithCalendarFormat$ - var p = 'am', i = hours, m = minutes; - if (hours > 12) { - p = 'pm'; - i = hours % 12; - } - if (minutes < 10) { - m = '0' + minutes; - } - - // %H : hour as a decimal number using 24-hour clock - newString = newString.replace("%H", hours < 10 ? '0' + hours : hours); - // %I : hour as a decimal number using 12-hour clock - newString = newString.replace("%I", i < 10 ? '0' + i : i); - // %M : minute as decimal number - newString = newString.replace("%M", m); - // %p : 'am' or 'pm' - newString = newString.replace("%p", p); - - return newString; -}; - String.prototype.isValidEmail = function() { var emailRE = /^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i; return emailRE.test(this);