File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
webcal/src/main/java/com/onixbyte/webcal Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 2626 *
2727 * @author Zihlu Wang
2828 */
29- public final class DateAndTimeFormatter {
29+ public final class Formatters {
3030
3131 /**
3232 * Get the {@link java.time.format.DateTimeFormatter datetime formatter}
@@ -45,4 +45,10 @@ public static DateTimeFormatter getUtcDatetimeFormatter() {
4545
4646 private static DateTimeFormatter utcDateTimeFormatter ;
4747
48+ /**
49+ * Private constructor to prevent this class being initialised.
50+ */
51+ private Formatters () {
52+ }
53+
4854}
Original file line number Diff line number Diff line change 1919
2020import com .onixbyte .webcal .WebCalendarNode ;
2121import com .onixbyte .webcal .config .Classification ;
22- import com .onixbyte .webcal .config .DateAndTimeFormatter ;
22+ import com .onixbyte .webcal .config .Formatters ;
2323
2424import java .text .MessageFormat ;
2525import java .time .Duration ;
@@ -269,8 +269,8 @@ public String resolve() {
269269 END:{0}""" ,
270270 /* 0 - tag */ TAG ,
271271 /* 1 - uid */ Optional .ofNullable (uid ).orElse (UUID .randomUUID ().toString ()) + "@" + domainName ,
272- /* 2 - dtstamp */ now .format (DateAndTimeFormatter .getUtcDatetimeFormatter ()),
273- /* 3 - start time */ start .atZone (ZoneId .systemDefault ()).format (DateAndTimeFormatter .getUtcDatetimeFormatter ()),
272+ /* 2 - dtstamp */ now .format (Formatters .getUtcDatetimeFormatter ()),
273+ /* 3 - start time */ start .atZone (ZoneId .systemDefault ()).format (Formatters .getUtcDatetimeFormatter ()),
274274 /* 4 - summary */ Optional .ofNullable (summary ).map ((item ) -> "\n SUMMARY:" + item ).orElse ("" ),
275275 /* 5 - categories */ Optional .ofNullable (categories )
276276 .map ((item ) -> !item .isEmpty () ? "\n CATEGORIES:" + resolveCategories () : null ).orElse ("" ),
You can’t perform that action at this time.
0 commit comments