Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseExpirationDate ¶
ParseExpirationDate parses a string representation of an expiration date and returns a time.Time value representing the expiration date. If the string is in interval format (e.g. "1d", "2w", "2m", "1y"), it calculates the expiration date from the current date and the specified interval. If the string is in full date format (e.g. "18/08/2023", "2023-02-12"), it tries to parse it as a full date and returns the parsed date if it is in the future. If the string doesn't match any of the supported formats, it returns an error.
Types ¶
Click to show internal directories.
Click to hide internal directories.