File indexing completed on 2024-12-29 04:51:03
0001 /* 0002 SPDX-FileCopyrightText: 2019 Nicolas Fella <nicolas.fella@gmx.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 function main(pass, node) 0008 { 0009 var res = node.result[0]; 0010 res.reservationFor.startDate = JsonLd.toDateTime(pass.field["reservation_time_from"].value, "dd.MM.yyyy", "de"); 0011 res.reservationFor.endDate = JsonLd.toDateTime(pass.field["reservation_time_till"].value, "dd.MM.yyyy", "de"); 0012 0013 res.reservationFor.location.name = pass.field["logo_text"].value; 0014 var addr = pass.field["adsress"].value.split("\n"); // sic! 0015 res.reservationFor.location.address = JsonLd.newObject("PostalAddress"); 0016 res.reservationFor.location.address.streetAddress = addr[0]; 0017 res.reservationFor.location.address.addressLocality = addr[1]; 0018 res.reservationFor.location.address.addressCountry = addr[2]; 0019 return res; 0020 }