|o||relativedate: the specified validity is interpreted as a relative terse date string. This is the default.|
|o||absolutedate: the specified validity is interpreted as an absolute terse date string.|
|o||days: the specified validity is interpreted as an integer number of days (positive or negative) as an offset to the reference date.|
|o||epoch: the specified validity is a unix epoch, used as absolute date.|
|o||detect: tries to guess what it got, relativedate if it has a sign (+/-), epoch if it has between 8 and 10 digits and absolutedate otherwise. Days can not be autodetected as they look like relativedate.|
If a relative validity is specified the duration is added to a reference date that defaults to the current time (UTC).
If the named parameter REFERENCEDATE is specified, this date is taken as the basis for calculating the relative date. The parameter could either contain a DateTime object or a parsable date string (i.e. 2012-05-24T08:33:47 see Date::Parse for a list of valid strings) which will be converted to an UTC DateTime object.
Terse date strings
The validity specification is passed in as the named parameter VALIDITY.
Absolute validities are specified in the format
Missing optional time specifications are replaced with 00. Example:
2006031618 is interpreted as 2006-03-16 18:00:00 UTC
Relative validities are specified as a partial terse date string in the format
Positive relative validities are interpreted as date offsets in the future as seen from reference date, negative relativie validities are interpreted as date offsets in the past.
+0003 (three months from now)
After this has been executed a date should be printed that is 2 years and 7 months in the future: the relative validity 2 years, 5 months is added to the offset which is 2 months in the future from now.
Helpermethod. Passes the given parameter $date_string to Date::Parse::strptime and constructs from the return an UTC DateTime object
Static helper, check if a datestring looks like a relative format. (Check if the first character is a +/-).
|perl v5.20.3||OPENXPKI::DATETIME (3)||2016-04-03|