CanScan
Loading...
Searching...
No Matches
fr.softsf.canscan.util.DateHelper Enum Reference

Produces iCalendar-compliant UTC timestamps (RFC 5545). More...

+ Collaboration diagram for fr.softsf.canscan.util.DateHelper:

Public Member Functions

String nowUtc ()
 Returns the current local date/time formatted as an iCalendar-compliant UTC timestamp (yyyyMMdd'T'HHmmss'Z').
 
String validateAndGetDateAndTime (LocalDate date, LocalTime time)
 Formats the given local date/time as an iCalendar-compliant UTC timestamp (RFC 5545).
 

Public Attributes

 INSTANCE
 

Static Private Attributes

static final DateTimeFormatter ICALENDAR_COMPLIANT_UTC_FORMATTER
 

Detailed Description

Produces iCalendar-compliant UTC timestamps (RFC 5545).

All inputs are treated as UTC; no system timezone conversion is applied. Format:
yyyyMMdd'T'HHmmss'Z'
.

Member Function Documentation

◆ nowUtc()

String fr.softsf.canscan.util.DateHelper.nowUtc ( )

Returns the current local date/time formatted as an iCalendar-compliant UTC timestamp (yyyyMMdd'T'HHmmss'Z').

◆ validateAndGetDateAndTime()

String fr.softsf.canscan.util.DateHelper.validateAndGetDateAndTime ( LocalDate date,
LocalTime time )

Formats the given local date/time as an iCalendar-compliant UTC timestamp (RFC 5545).

Parameters
datelocal date
timelocal time
Returns
UTC timestamp (yyyyMMdd'T'HHmmss'Z'), or "" if null

Member Data Documentation

◆ ICALENDAR_COMPLIANT_UTC_FORMATTER

final DateTimeFormatter fr.softsf.canscan.util.DateHelper.ICALENDAR_COMPLIANT_UTC_FORMATTER
staticprivate
Initial value:
=
DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss'Z'")

◆ INSTANCE

fr.softsf.canscan.util.DateHelper.INSTANCE

The documentation for this enum was generated from the following file: