PluginProbe
FeedWordPress / 2014.0805
FeedWordPress v2014.0805
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
← All changes | feedtime.class.php +4 -8 trunk2014.0805 View file →
@@ -13,9 +13,9 @@
13 13 * To parse a string representation of a date-time from a feed, instantiate and
14 14 * then pull the timestamp:
15 15 *
16 16 * $time = new FeedTime($s);
17 - * if ( ! $time->failed()) :
17 + * if (!$time->failed()) :
18 18 * $ts = $time->timestamp();
19 19 * else :
20 20 * // ...
21 21 * endif;
@@ -23,16 +23,12 @@
23 23 class FeedTime {
24 24 var $rep;
25 25 var $ts;
26 26
27 - function __construct( $time ) {
27 + function FeedTime ($time) {
28 28 $this->set($time);
29 29 } /* FeedTime constructor */
30 30
31 - function FeedTime( $time ) {
32 - self::__construct( $time );
33 - }
34 -
35 31 function set ($time, $recurse = false) {
36 32 $this->rep = $time;
37 33 $this->ts = NULL;
38 34 if (is_numeric($time)) : // Presumably a Unix-epoch timestamp
@@ -63,9 +59,9 @@
63 59 } /* FeedTime::set() */
64 60
65 61 function timestamp () {
66 62 $unix = NULL;
67 - if ( ! $this->failed()) :
63 + if (!$this->failed()) :
68 64 $unix = $this->ts;
69 65 endif;
70 66 return $unix;
71 67 } /* FeedTime::timestamp() */
@@ -70,9 +66,9 @@
70 66 return $unix;
71 67 } /* FeedTime::timestamp() */
72 68
73 69 function failed () {
74 - return ( !is_numeric($this->ts) or ! $this->ts or ($this->ts <= 0));
70 + return (!is_numeric($this->ts) or !$this->ts or ($this->ts <= 0));
75 71 } /* FeedTime::failed() */
76 72
77 73 /**
78 74 * FeedTime::parse_w3cdtf() parses a W3C date-time format date into a