xmltv/grab/uk_tvguide CHANGELOG, 1.4, 1.5 tv_grab_uk_tvguide, 1.5, 1.6
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/uk_tvguide
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31836
Modified Files:
CHANGELOG tv_grab_uk_tvguide
Log Message:
Fix for special dates
Index: tv_grab_uk_tvguide
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_tvguide/tv_grab_uk_tvguide,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tv_grab_uk_tvguide 14 Dec 2013 10:42:11 -0000 1.5
--- tv_grab_uk_tvguide 22 Dec 2013 14:49:54 -0000 1.6
***************
*** 379,382 ****
--- 379,396 ----
if ($showtimes) {
my ($h, $i, $a, $h2, $i2, $a2, $dt) = $showtimes->as_text =~ /(\d*):(\d*)(am|pm)(?:-(\d*):(\d*)(am|pm))?\s*(?:\(.*\))?\s*(.*)$/;
+ if ($dt && $dt !~ /\D\D\D\s\d\d?\s\D\D\D/) {
+ my @thedt = localtime(time); # ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
+ my ($yr1, $yr2) = ($thedt[5]+1900, $thedt[5]+1900);
+ if ($thedt[4] == 11) { $yr2++; }
+ if ($thedt[4] == 0) { $yr1--; }
+ SWITCH: {
+ $dt =~ 'Christmas\s+Eve' && do { $dt = '24 Dec '.$yr1; last SWITCH; };
+ $dt =~ 'Christmas\s+Day' && do { $dt = '25 Dec '.$yr1; last SWITCH; };
+ $dt =~ 'Boxing\s+Day' && do { $dt = '26 Dec '.$yr1; last SWITCH; };
+ $dt =~ 'New\s+Years\s+Eve' && do { $dt = '31 Dec '.$yr1; last SWITCH; };
+ $dt =~ 'New\s+Years\s+Day' && do { $dt = '1 Jan ' .$yr2; last SWITCH; };
+ undef $dt;
+ }
+ }
if ($dt) {
#v1.3: $showtime = DateTime::Format::DateParse->parse_datetime( $dt, 'Europe/London' );
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_tvguide/CHANGELOG,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CHANGELOG 14 Dec 2013 17:38:19 -0000 1.4
--- CHANGELOG 22 Dec 2013 14:49:54 -0000 1.5
***************
*** 1,2 ****
--- 1,3 ----
+ 1.6 22-Dec-2013 Fix for special dates
1.5 14-Dec-2013 Fix for website changes
1.4 20-Oct-2013 Minor code change
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk