From: Axel Etzold Date: 2008-09-06T09:21:30+09:00 Subject: Re: How to parse in RSS -------- Original-Nachricht -------- > Datum: Sat, 6 Sep 2008 08:53:52 +0900 > Von: Ruby Girl > An: ruby-talk@ruby-lang.org > Betreff: How to parse in RSS > Hi Experts, > > Is there another way to get a valid date from pubDate in RSS like this > example: > Wed, 23 Feb 2005 16:12:56 GMT > ...to a format (YYYYMMDD hh:mm:ss) that is recognizable by the parsers? > > Ruby Girl > -- > Posted via http://www.ruby-forum.com/. Hi Ruby Girl, if you remove the and the weekday, parsing works: require "date" text="Wed, 23 Feb 2005 16:12:56 GMT" text.gsub!(/<\/*pubDate>/,'') text.gsub!(/^...,/,'') p text #text="23 Feb 2005 16:12:56 GMT" p DateTime.parse(text) Best regards, Axel -- GMX Kostenlose Spiele: Einfach online spielen und Spa� haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196