Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Date(3)		      User Contributed Perl Documentation	       Date(3)

NAME
       XMLTV::Date - Date parsing routines for the xmltv package

SEE ALSO
       Date::Manip

"parse_date()"
       Wrapper for "Date::Manip::ParseDate()" that does	two things: firstly,
       if the year is not specified it chooses between last year, this year
       and next	year depending on which	date would be closest to now.  (If
       only one	of those dates is valid, for example because day-of-week is
       specified, then the valid one is	chosen;	if the time can	only be	parsed
       without adding an explicit year then that is chosen.)  Secondly,	an
       exception is thrown if the date cannot be parsed.

       Argument	is a single string.

"time_xmltv_to_iso()"
       Converts	a XMLTV	time  e.g. "20140412090000 +0300" to ISO format	i.e.
       "2014-04-12T09:00:00.000+03:00"

       Argument	is string time to convert.

"time_iso_to_xmltv()"
       Converts	an ISO time e.g. "2014-04-12T09:00:00.000+03:00" to XMLTV
       format, i.e.  "20140412090000 +0300"

       Argument	is string time to convert.

"time_xmltv_to_epoch()"
       Converts	a XMLTV	time  e.g. "20140412090000 +0300" to seconds since the
       epoch

       (uses POSIX::mktime rather than Date::Manip to avoid issues with	the
       latter)

       Alternatively you could use DateTime::Format::XMLTV on CPAN

       Argument	is string time to convert.  Optional 2nd argument: set to 1
       ignore the tz offset in the calculation

"time_iso_to_epoch()"
       Converts	an iso time (e.g. "2014-04-12T09:00:00.000+03:00") to epoch
       time

       (uses POSIX::mktime rather than Date::Manip to avoid issues with	the
       latter)

       Alternatively you could use DateTime::Format::XMLTV on CPAN

       Argument	is string time to convert.  Optional 2nd argument: set to 1
       ignore the tz offset in the calculation

perl v5.32.1			  2021-08-26			       Date(3)

NAME | SEE ALSO | "parse_date()" | "time_xmltv_to_iso()" | "time_iso_to_xmltv()" | "time_xmltv_to_epoch()" | "time_iso_to_epoch()"

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XMLTV::Date&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help