@immomio/api-library
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -48,2 +48,3 @@ "use strict"; | ||
var api_1 = require("../api"); | ||
var date_1 = require("../utils/date"); | ||
var fetch_1 = require("../utils/fetch"); | ||
@@ -58,3 +59,3 @@ var filter_1 = require("../utils/filter"); | ||
exports.convertAppointment = function (data) { | ||
var appointment = __assign({}, data, { date: new Date(data.date) }); | ||
var appointment = __assign({}, data, { date: date_1.parseDate(data.date) }); | ||
return appointment; | ||
@@ -138,3 +139,3 @@ }; | ||
if (date === void 0) { date = new Date(); } | ||
return new Date(appointment.date) > date; | ||
return date_1.parseDate(appointment.date) > date; | ||
}; | ||
@@ -141,0 +142,0 @@ var hasAppointmentFreeSlots = function (appointment) { |
export * from './fetch'; | ||
export * from './jsonHal'; | ||
export * from './date'; |
@@ -8,2 +8,3 @@ "use strict"; | ||
__export(require("./jsonHal")); | ||
__export(require("./date")); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@immomio/api-library", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Immomio library to access the immomio-API", | ||
@@ -5,0 +5,0 @@ "engineStrict": true, |
@@ -5,2 +5,3 @@ | ||
import { ProfileUrl } from '../profiles' | ||
import { parseDate } from '../utils/date' | ||
import { fetch } from '../utils/fetch' | ||
@@ -70,3 +71,3 @@ import { filter } from '../utils/filter' | ||
...data, | ||
date: new Date(data.date), | ||
date: parseDate(data.date), | ||
} | ||
@@ -125,3 +126,3 @@ return appointment | ||
const isAppointmentAfterDate = (appointment: Appointment, date: Date = new Date()) => | ||
new Date(appointment.date) > date | ||
parseDate(appointment.date) > date | ||
@@ -128,0 +129,0 @@ /** checks if an appointment has a slot open */ |
export * from './fetch' | ||
export * from './jsonHal' | ||
export * from './date' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44849
55
855