Retrieves the datetime set for the Validity Period.
This property represents the exact date and time the SMS should be considered valid. If null, it implies that a specific datetime has not been set for this validity period.
The datetime as a Date object or null if not set
Retrieves the interval set for the Validity Period.
This property represents the duration in seconds for which the SMS should be considered valid. If null, it implies that a specific interval has not been set for this validity period.
The interval in seconds or null if not set
Sets the datetime for the SMS Validity Period.
This method allows setting a specific date and time until which the SMS is considered valid. Can be set using a Date object or a string that can be parsed into a Date.
The datetime to set as a Date object or a string representation
The instance of this VP, allowing for method chaining
Sets the interval for the SMS Validity Period.
This method allows setting a specific duration in seconds until which the SMS is considered valid. It's an alternative to setting a specific datetime.
The interval in seconds to set for the validity period
The instance of this VP, allowing for method chaining
Converts the Validity Period to a PDU string representation.
This method generates a string suitable for inclusion in a PDU, based on the validity period's format. It can handle both absolute and relative formats and adjusts the PDU's validity period format accordingly. This is critical for ensuring that the SMS's validity period is correctly interpreted by the SMSC.
The PDU instance to which this validity period belongs
A string representation of the validity period for inclusion in the PDU
Represents the Validity Period (VP) of an SMS message.
Defines how long an SMS is stored at the SMSC before delivery attempts cease. This duration ensures messages remain relevant and can vary from minutes to days based on the sender's preference.