Stay organized with collections
Save and categorize content based on your preferences.
FreezePeriod
open class FreezePeriod
A class that represents one freeze period which repeats annually. A freeze period has two java.time#MonthDay 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 |
Creates a freeze period by its start and end dates.
|
Public methods |
open MonthDay! |
Returns the end date (inclusive) of this freeze period.
|
open MonthDay! |
Returns the start date (inclusive) of this freeze period.
|
open String |
|
Public constructors
FreezePeriod
FreezePeriod(
start: MonthDay!,
end: MonthDay!)
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.
Public methods
getEnd
open fun getEnd(): MonthDay!
Returns the end date (inclusive) of this freeze period.
getStart
open fun getStart(): MonthDay!
Returns the start date (inclusive) of this freeze period.
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FreezePeriod\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFreezePeriod\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/admin/FreezePeriod \"View this page in Java\") \n\n```\nopen class FreezePeriod\n```\n\n|---|-------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.admin.FreezePeriod](#) |\n\nA class that represents one freeze period which repeats *annually*. A freeze period has two java.time#MonthDay 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.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [FreezePeriod](#FreezePeriod(java.time.MonthDay,%20java.time.MonthDay))`(`start:` `[MonthDay](../../../java/time/MonthDay.html#)!`, `end:` `[MonthDay](../../../java/time/MonthDay.html#)!`)` Creates a freeze period by its start and end dates. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| open [MonthDay](../../../java/time/MonthDay.html#)! | [getEnd](#getEnd())`()` Returns the end date (inclusive) of this freeze period. |\n| open [MonthDay](../../../java/time/MonthDay.html#)! | [getStart](#getStart())`()` Returns the start date (inclusive) of this freeze period. |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### FreezePeriod\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nFreezePeriod(\n start: MonthDay!, \n end: MonthDay!)\n```\n\nCreates 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.\n\nPublic methods\n--------------\n\n### getEnd\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getEnd(): MonthDay!\n```\n\nReturns the end date (inclusive) of this freeze period. \n\n### getStart\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getStart(): MonthDay!\n```\n\nReturns the start date (inclusive) of this freeze period. \n\n### toString\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |"]]