27 lines
1.1 KiB
Java
27 lines
1.1 KiB
Java
package nl.veenm.paypoint.helper;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
public class EmailHelper {
|
|
public static String getIcs(String dtStamp, LocalDate date, String formattedTime, String formattedEndTime, String location) {
|
|
String formatted = """
|
|
BEGIN:VCALENDAR
|
|
VERSION:2.0
|
|
PRODID:-//PayPoint//Afspraak//NL
|
|
BEGIN:VEVENT
|
|
ORGANIZER;CN=Hairstyling By Daan:mailto:danielle@hairstylingbydaan.nl
|
|
UID:12345
|
|
DTSTAMP:%s
|
|
DTSTART:%sT%s00
|
|
DTEND:%sT%s00
|
|
SUMMARY:Afspraak bij Hairstyling By Daan
|
|
LOCATION:%s
|
|
DESCRIPTION:Bevestiging van uw afspraak bij Hairstyling By Daan
|
|
END:VEVENT
|
|
END:VCALENDAR
|
|
""".formatted(dtStamp, date.toString().replace("-", ""), formattedTime.replace(":", ""), date.toString().replace("-", ""), formattedEndTime.replace(":", ""), location.replace("<br>", " "));
|
|
System.out.println(formatted);
|
|
return formatted;
|
|
}
|
|
}
|