PHP 클래스 FeedTime, feedwordpress

We will try to be as tolerant as possible of different representations, since RSS Is A Fucking Mess, broken dates seem to be especially pervasive, etc. Supports anything that your version of PHP's strtotime() can handle; also has a built-in parser for W3C DTF, in case your PHP doesn't have that. Tries to parse a W3C DTF first; then falls back to strtotime(). If strtotime fails due to a mystery timezone, then we will try again on local time, with the timezone stripped out. To parse a string representation of a date-time from a feed, instantiate and then pull the timestamp: $time = new FeedTime($s); if (!$time->failed()) : $ts = $time->timestamp(); else : ... endif;
파일 보기 프로젝트 열기: radgeek/feedwordpress 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$rep
$ts

공개 메소드들

메소드 설명
FeedTime ( $time ) * FeedTime constructor
__construct ( $time )
failed ( ) * FeedTime::timestamp()
parse_w3cdtf ( ) FeedTime::parse_w3cdtf() parses a W3C date-time format date into a Unix epoch timestamp. Derived from the parse_w3cdtf function included with MagpieRSS by Kellan Elliot-McCrea , with modifications and bugfixes by Charles Johnson , under the terms of the GPL.
set ( $time, $recurse = false )
timestamp ( ) * FeedTime::set()

메소드 상세

FeedTime() 공개 메소드

* FeedTime constructor
public FeedTime ( $time )

__construct() 공개 메소드

public __construct ( $time )

failed() 공개 메소드

* FeedTime::timestamp()
public failed ( )

parse_w3cdtf() 공개 메소드

FeedTime::parse_w3cdtf() parses a W3C date-time format date into a Unix epoch timestamp. Derived from the parse_w3cdtf function included with MagpieRSS by Kellan Elliot-McCrea , with modifications and bugfixes by Charles Johnson , under the terms of the GPL.
public parse_w3cdtf ( )

set() 공개 메소드

public set ( $time, $recurse = false )

timestamp() 공개 메소드

* FeedTime::set()
public timestamp ( )

프로퍼티 상세

$rep 공개적으로 프로퍼티

public $rep

$ts 공개적으로 프로퍼티

public $ts