I am trying to create a rss feed from a web page. I am able to get the data to create the title, but I am trying to get the date updated correctly. There is a string on the page, that tells what time of day the news was reported, such as “Time of Report: 1pm”. So how can I get the “1pm” and convert that to a date string that contains the current date, with this time?
Thanks,
CP
I am trying to create a rss feed from a web page. I am
Share
The Pipes “Date Builder” module is surprisingly powerful.
You can actually feed it a string like “1pm” and it will return:
The date is relative to when you run it – in this case it assumes “1pm Today”. The result is “hour21” in UTC because it parsed in Yahoo’s time-zone. So if you need something specific, use the “Sting Builder” to append the time-zone. For example “1pm GMT” gives:
Obviously you may run into issues if your pipe runs after a date change – an “11pm” entry could easily be read the following morning, leading to inaccurate results.