does anybody has a parser for this DATE format?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pedrotuga
Forum Contributor
Posts: 249
Joined: Tue Dec 13, 2005 11:08 pm

does anybody has a parser for this DATE format?

Post by pedrotuga »

I want to fetch news from a few authors...
in order not to confuse them or ask them to post them on one more place, i will ftetch them from theirs blog's feeds.

most use wordpress, some even blogspot...

the "published" date comes in this format:

Wed, 09 Aug 2006 06:58:21 +0000

does anybody has a parser for unixtimestamp or timestamp?... magpie and lastss dont have

thx
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Code: Select all

$date = date('m/d/Y', strtotime($fetched_date_from_wordpress));
User avatar
pedrotuga
Forum Contributor
Posts: 249
Joined: Tue Dec 13, 2005 11:08 pm

Post by pedrotuga »

lets try this out.
User avatar
pedrotuga
Forum Contributor
Posts: 249
Joined: Tue Dec 13, 2005 11:08 pm

Post by pedrotuga »

Everah wrote:

Code: Select all

$date = date('m/d/Y', strtotime($fetched_date_from_wordpress));
works like a charm... amazing.
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

strtotime -- Parse about any English textual datetime description into a Unix timestamp
Post Reply