Hi Soisik, Thanks for advice. I just simply follow this description and the exemples :
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array/filter After some research it’s seem to be a javasript langugae version problem on my Debian Wheezy distrib. Because some fonctionnality that i use in this code, like Math.max seem to be call in oldest way : http://www.jstips.co/en/javascript/calculate-the-max-min-value-from-an-array/ this ES2105 way don’t work var DateDepartMax = Math.max(...DatesDepart); but this : var DateDepartMax = Math.max.apply(null,DatesDepart); seem to work And the fonction array filter seem to do not are implemented in my current javascript language version… So i have 3 options : 1 - update my distrib, but it's need some stuff 2 - update javascript language in my actual distrib but i don’t know if it’s possible and if it’s simply way 3 - Modify my script to be compliant whis my javascript language version ( and i don’t know what version of javascript i use..) I continu to search. Regards, > Le 1 févr. 2018 à 14:27, Soisik Froger <[email protected]> a > écrit : > > On 01/02/2018 13:23, Vincent LEPETIT wrote: >> function grep_leavingdate (description) >> { >> var patterndepart = /{LEAVINGDATE}(.*)/; >> var trouve = description.match(patterndepart); >> if (trouve !== null ) return trouve[1]; >> } >> function return_maxleavingdate(description) >> { >> var descriptionfiltreDatesDeparts = description.filter (grep_leavingdate); >> var DatesDepart = descriptionfiltreDatesDeparts.map(grep_leavingdate); >> var DateDepartMax = Math.max(...DatesDepart); >> return DateDepartMax; >> } > > The syntax is definitely not correct, for example, grep_leavingdate is a > function, and needs a parameter, but your refering to it as a variable. I > think they are few other mistakes as well. > > -- > Soisik FROGER > Consultante en logiciels libres, Chef de projet | Lyon, Fr > Savoir-faire Linux > Bureau : (+33) 9 72 46 89 80 puis poste 609 > Mobile : (+33) 6 58 07 25 37 > Ring : soisik > > Message de confidentialité : Ce courriel (de même que les fichiers joints) > est strictement réservé à l'usage de la personne ou de l'entité à qui il est > adressé et peut contenir de l'information privilégiée et confidentielle. > Toute divulgation, distribution ou copie de ce courriel est strictement > prohibée. Si vous avez reçu ce courriel par erreur, veuillez nous en aviser > sur-le-champ, détruire toutes les copies et le supprimer de votre système > informatique. > _______________________________________________________________ > Ldap Synchronization Connector (LSC) - http://lsc-project.org > > lsc-users mailing list > [email protected] > https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

