Barcode.CalendarDateTime

  • Barcode.CalendarDateTime stores date and time information extracted from barcodes, used primarily for calendar events.

  • If the barcode lacks specific time details (hours, minutes, seconds), these fields will default to -1.

  • You can access individual components of the date and time, such as year, month, day, hours, minutes, and seconds, using dedicated methods.

  • The getRawValue() method provides the original, unparsed date/time string as encoded in the barcode.

  • The isUtc() method indicates whether the extracted date and time are represented in Coordinated Universal Time (UTC).

public static class Barcode.CalendarDateTime extends Object

DateTime data type used in calendar events. If hours/minutes/seconds are not specified in the barcode value, they will be set to -1.

Public Method Summary

int
getDay()
Gets the day of the calendar date time.
int
getHours()
Gets the hours of the calendar date time.
int
getMinutes()
Gets the minutes of the calendar date time.
int
getMonth()
Gets the month of the calendar date time.
String
getRawValue()
Gets the raw value as it was encoded in the barcode.
int
getSeconds()
Gets the seconds of the calendar date time.
int
getYear()
Gets the year of the calendar date time.
boolean
isUtc()
Gets whether the date time is UTC.

Inherited Method Summary

Public Methods

public int getDay ()

Gets the day of the calendar date time.

public int getHours ()

Gets the hours of the calendar date time.

public int getMinutes ()

Gets the minutes of the calendar date time.

public int getMonth ()

Gets the month of the calendar date time.

public String getRawValue ()

Gets the raw value as it was encoded in the barcode.

Structured values are not parsed, for example: '20130131', '20130210T010203', '20130210T010203Z'. Please refer to here for more details.

Returns null if the raw value can not be determined.

public int getSeconds ()

Gets the seconds of the calendar date time.

public int getYear ()

Gets the year of the calendar date time.

public boolean isUtc ()

Gets whether the date time is UTC.