turf-common 1.2.1-beta.50 → 1.2.1-beta.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ export declare class DateUtilService {
|
|
|
4
4
|
getNDaysCode(n: number): string;
|
|
5
5
|
getDateCode(date: Date): string;
|
|
6
6
|
addNDaysToDate(date: Date, n: number): Date;
|
|
7
|
-
convertStringToDate(dateString: string, format: string
|
|
7
|
+
convertStringToDate(dateString: string, format: string): Date;
|
|
8
8
|
isInPast(date: Date): boolean;
|
|
9
9
|
getDateFromDatabaseDate: (date: string) => Date;
|
|
10
10
|
noOfDaysBetweenDates: (date1: Date, date2: Date) => number;
|
package/build/utils/date-util.js
CHANGED
|
@@ -24,12 +24,11 @@ var DateUtilService = /** @class */ (function () {
|
|
|
24
24
|
DateUtilService.prototype.addNDaysToDate = function (date, n) {
|
|
25
25
|
return (0, date_fns_1.add)(date, { days: n });
|
|
26
26
|
};
|
|
27
|
-
DateUtilService.prototype.convertStringToDate = function (dateString, format
|
|
27
|
+
DateUtilService.prototype.convertStringToDate = function (dateString, format) {
|
|
28
28
|
var parsedDate = (0, date_fns_1.parse)(dateString, format, new Date());
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return parsedDate;
|
|
29
|
+
// IST has a fixed offset of UTC+5:30
|
|
30
|
+
var indianDate = new Date(parsedDate.getTime() + 330 * 60 * 1000);
|
|
31
|
+
return indianDate;
|
|
33
32
|
};
|
|
34
33
|
DateUtilService.prototype.isInPast = function (date) {
|
|
35
34
|
return date < new Date();
|
|
@@ -114,6 +113,3 @@ var DateUtilService = /** @class */ (function () {
|
|
|
114
113
|
}());
|
|
115
114
|
exports.DateUtilService = DateUtilService;
|
|
116
115
|
exports.dateUtilService = new DateUtilService();
|
|
117
|
-
function utcToZonedTime(parsedDate, timeZone) {
|
|
118
|
-
throw new Error("Function not implemented.");
|
|
119
|
-
}
|