Java android.text.format Time fields, constructors, methods, implement or subclass

Example usage for Java android.text.format Time fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.text.format Time.

The text is from its open source code.

Field

StringTIMEZONE_UTC
intEPOCH_JULIAN_DAY
The Julian day of the epoch, that is, January 1, 1970 on the Gregorian calendar.
intMONTH_DAY
intSUNDAY
intMONDAY
intTUESDAY
intWEDNESDAY
intTHURSDAY
intFRIDAY
intSATURDAY

Constructor

Time()
Construct a Time object in the default timezone.
Time(String timezoneId)
Construct a Time object in the timezone named by the string argument "timezone".
Time(Time other)
A copy constructor.

Method

booleanafter(Time that)
Returns true if the time represented by this Time object occurs after the given time.
booleanbefore(Time that)
Returns true if the time represented by this Time object occurs before the given time.
voidclear(String timezoneId)
Clears all values, setting the timezone to the given timezone.
intcompare(Time a, Time b)
Compare two Time objects and return a negative number if a is less than b , a positive number if a is greater than b , or 0 if they are equal.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
Stringformat(String format)
Print the current value given the format string provided.
Stringformat2445()
Format according to RFC 2445 DATE-TIME type.
Stringformat3339(boolean allDay)
Return a string in the RFC 3339 format.
intgetActualMaximum(int field)
Return the maximum possible value for the given field given the value of the other fields.
StringgetCurrentTimezone()
Returns the timezone string that is currently set for the device.
intgetJulianDay(long millis, long gmtoff)
Computes the Julian day number for a point in time in a particular timezone.
longnormalize(boolean ignoreDst)
Ensures the values in each field are in range.
booleanparse(String s)
Parses a date-time string in either the RFC 2445 format or an abbreviated format that does not include the "time" field.
booleanparse3339(String s)
Parse a time in RFC 3339 format.
voidset(long millis)
Sets the fields in this Time object given the UTC milliseconds.
voidset(Time that)
Copy the value of that to this Time object.
voidset(int second, int minute, int hour, int monthDay, int month, int year)
Sets the fields.
voidset(int monthDay, int month, int year)
Sets the date from the given fields.
longsetJulianDay(int julianDay)

Sets the time from the given Julian day number, which must be based on the same timezone that is set in this Time object.

voidsetToNow()
Sets the time of the given Time object to the current time.
voidswitchTimezone(String timezone)
Convert this time object so the time represented remains the same, but is instead located in a different timezone.
longtoMillis(boolean ignoreDst)
Converts this time to milliseconds.
StringtoString()
Return the current time in YYYYMMDDTHHMMSS<tz> format