ExpirationDate

ExpirationDate

is an option for various functions that specifies when a persistent value should be treated as expired.

Details

  • ExpirationDate can be used for PersistentSymbol and InitializationValue.
  • Values can be given as absolute times or date and time specifications.
  • The value Infinity () or None can be used to specify that a persistent value should never expire.
  • An expired persistent value is treated as nonexistent, and the underlying persistent object may be removed.

Examples

open allclose all

Basic Examples  (3)

Define a persistent value that expires at the beginning of the year 2020:

Verify the expiration date of the underlying persistent object:

Define a persistent value that expires at the beginning of next year:

Verify the expiration date of the underlying persistent object:

Define a persistent value that expires immediately:

Accessing an expired persistent value behaves as if it did not exist:

Properties & Relations  (1)

Values specified with PersistenceTime are converted to absolute expiration dates:

Wolfram Research (2017), ExpirationDate, Wolfram Language function, https://reference.wolfram.com/language/ref/ExpirationDate.html.

Text

Wolfram Research (2017), ExpirationDate, Wolfram Language function, https://reference.wolfram.com/language/ref/ExpirationDate.html.

BibTeX

@misc{reference.wolfram_2021_expirationdate, author="Wolfram Research", title="{ExpirationDate}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ExpirationDate.html}", note=[Accessed: 05-August-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_expirationdate, organization={Wolfram Research}, title={ExpirationDate}, year={2017}, url={https://reference.wolfram.com/language/ref/ExpirationDate.html}, note=[Accessed: 05-August-2021 ]}

CMS

Wolfram Language. 2017. "ExpirationDate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExpirationDate.html.

APA

Wolfram Language. (2017). ExpirationDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExpirationDate.html