Barcode.CalendarDateTime
Stay organized with collections
Save and categorize content based on your preferences.
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
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eBarcode.CalendarDateTime\u003c/code\u003e stores date and time information extracted from barcodes, used primarily for calendar events.\u003c/p\u003e\n"],["\u003cp\u003eIf the barcode lacks specific time details (hours, minutes, seconds), these fields will default to -1.\u003c/p\u003e\n"],["\u003cp\u003eYou can access individual components of the date and time, such as year, month, day, hours, minutes, and seconds, using dedicated methods.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetRawValue()\u003c/code\u003e method provides the original, unparsed date/time string as encoded in the barcode.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eisUtc()\u003c/code\u003e method indicates whether the extracted date and time are represented in Coordinated Universal Time (UTC).\u003c/p\u003e\n"]]],[],null,["# Barcode.CalendarDateTime\n\npublic static class **Barcode.CalendarDateTime** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nDateTime data type used in calendar events. If hours/minutes/seconds are not specified in\nthe barcode value, they will be set to -1. \n\n### Public Method Summary\n\n|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [getDay](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getDay())() Gets the day of the calendar date time. |\n| int | [getHours](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getHours())() Gets the hours of the calendar date time. |\n| int | [getMinutes](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getMinutes())() Gets the minutes of the calendar date time. |\n| int | [getMonth](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getMonth())() Gets the month of the calendar date time. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getRawValue](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getRawValue())() Gets the raw value as it was encoded in the barcode. |\n| int | [getSeconds](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getSeconds())() Gets the seconds of the calendar date time. |\n| int | [getYear](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#getYear())() Gets the year of the calendar date time. |\n| boolean | [isUtc](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.CalendarDateTime#isUtc())() Gets whether the date time is UTC. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public int **getDay** ()\n\nGets the day of the calendar date time. \n\n#### public int **getHours** ()\n\nGets the hours of the calendar date time. \n\n#### public int **getMinutes** ()\n\nGets the minutes of the calendar date time. \n\n#### public int **getMonth** ()\n\nGets the month of the calendar date time. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getRawValue** ()\n\nGets the raw value as it was encoded in the barcode.\n\nStructured values are not parsed, for example: '20130131', '20130210T010203',\n'20130210T010203Z'. Please refer to [here](//www.ietf.org/rfc/rfc2445.txt)\nfor more details.\n\nReturns `null` if the raw value can not be determined. \n\n#### public int **getSeconds** ()\n\nGets the seconds of the calendar date time. \n\n#### public int **getYear** ()\n\nGets the year of the calendar date time. \n\n#### public boolean **isUtc** ()\n\nGets whether the date time is UTC."]]