FreezePeriod


public class FreezePeriod
extends Object

java.lang.Object
   ↳ android.app.admin.FreezePeriod


A class that represents one freeze period which repeats annually. A freeze period has two java.time values that define the start and end dates of the period, both inclusive. If the end date is earlier than the start date, the period is considered wrapped around the year-end. As far as freeze period is concerned, leap year is disregarded and February 29th should be treated as if it were February 28th: so a freeze starting or ending on February 28th is identical to a freeze starting or ending on February 29th. When calulating the length of a freeze or the distance bewteen two freee periods, February 29th is also ignored.

Summary

Public constructors

FreezePeriod(MonthDay start, MonthDay end)

Creates a freeze period by its start and end dates.

Public methods

MonthDay getEnd()

Returns the end date (inclusive) of this freeze period.

MonthDay getStart()

Returns the start date (inclusive) of this freeze period.

String toString()

Returns a string representation of the object.

Inherited methods

Public constructors

FreezePeriod

Added in API level 28
public FreezePeriod (MonthDay start, 
                MonthDay end)

Creates a freeze period by its start and end dates. If the end date is earlier than the start date, the freeze period is considered wrapping year-end.

Parameters
start MonthDay

end MonthDay

Public methods

getEnd

Added in API level 28
public MonthDay getEnd ()

Returns the end date (inclusive) of this freeze period.

Returns
MonthDay

getStart

Added in API level 28
public MonthDay getStart ()

Returns the start date (inclusive) of this freeze period.

Returns
MonthDay

toString

Added in API level 28
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.