date-time-js
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"name": "date-time-js", | ||
@@ -4,0 +4,0 @@ "title": "DateTimeJS", |
@@ -150,3 +150,3 @@ export declare class DateTime { | ||
/** | ||
* Adds time to the date. If a unit of time is 'offset' then the method adds an offset to the date after converting it to minutes. | ||
* Adds time to the date. If a unit of time is 'offset' then the method adds an offset to the date after converting it to minutes (it does not change the offset of the date). | ||
* | ||
@@ -153,0 +153,0 @@ * @param {number | string} value An amount of time. A unit of time representing the offset ('offset') can be a number between -720 and 840, or a string. The string can be in one of the following formats 'Z', '00:00', '-00:00', '+00:00', '01:30', '-01:30', '+01:30', 'GMTZ', 'GMT+01:30', 'GMT-01:30'. |
@@ -183,7 +183,7 @@ var DayAndMonth = (function () { | ||
if (!DateTime.isInteger(offset)) { | ||
return null; | ||
return ''; | ||
} | ||
// Time zones vary from -12:00 to 14:00. | ||
if (offset < -720 || offset > 840) { | ||
return null; | ||
return ''; | ||
} | ||
@@ -308,3 +308,3 @@ var sign = '+'; | ||
if (!DateTime.isDate(date) && !DateTime.isDateTime(date)) { | ||
return null; | ||
return ''; | ||
} | ||
@@ -319,3 +319,3 @@ var format, offset = 0; | ||
if (!DateTime.isValidTimeZoneOffset(offset)) { | ||
return null; | ||
return ''; | ||
} | ||
@@ -328,3 +328,3 @@ } | ||
if (!DateTime.isValidTimeZoneOffset(offset)) { | ||
return null; | ||
return ''; | ||
} | ||
@@ -576,3 +576,3 @@ } | ||
if (this.isEmpty()) { | ||
return null; | ||
return ''; | ||
} | ||
@@ -579,0 +579,0 @@ return DateTime.format(this._date, format, this._offset); |
Sorry, the diff of this file is not supported yet
127236