Closed luwol03 closed 4 years ago
Ok, this is not that hard. I will do this later.
I know, I do this with a function like that
function convert(untisdate) { var ud = untisdate.toString(); return new Date(ud.substr(0,4) + '.' + ud.substr(4,2) + '.' + ud.substr(6,2)); }
but it will be a nice feature, if it is intecraded in the lib.
Implemented both (time and date) in https://github.com/TheNoim/WebUntis/commit/adf606b743e44b9c994362f2ed22bea0bdc26c93
i do this e.jsdate = untis.convertUntisDate(e.date);
and i get this error
(node:6268) UnhandledPromiseRejectionWarning: TypeError: untis.convertUntisDate is not a function at data.forEach.e (c:\Users\wolflu\Desktop\UntisAPI\index.js:40:39) at Array.forEach (<anonymous>) at untis.getOwnTimetableForRange.then (c:\Users\wolflu\Desktop\UntisAPI\index.js:33:18) at process._tickCallback (internal/process/next_tick.js:68:7) warning.js:18 (node:6268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
what I do wrong?
I have installed this version: webuntis@1.10.0
Oh, I now my problem, i had to do e.jsdate = WebUntisLib.convertUntisDate(e.date)
because untis is my object whith will be created by login and not the variable which I set by require. Thank you for this quickly change. I don't know any faster guys than you. Thank You
Can you tell my how big the api pdf is?
277kb
Thanks, but I mean the number of pages
@TheNoim are using an older version. It's 13 pages and you can request it via Untis Helpdesk
ok thank you very much, because I am considering whether I should inquire
Hello, I need a function for converting a untis date into js date object.