Needs review
Project:
Feeds Tamper
Version:
7.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Feb 2013 at 00:39 UTC
Updated:
3 Jul 2015 at 12:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
queenvictoria commentedPatch attached
Comment #2
queenvictoria commentedUpdated to accept specific dates. Use case: Published date is sometimes not set in RSS feeds (or set to zero which can render 1900-01-01T06:00:00Z for example). Or you might just want recent articles to come in.
So invert the filter and set the date to 1990-01-01 to filter out items prior to 1990.
The new date field in this filter will accept relative times too. So you can say
"-2 years"
or
"last Friday two years ago"
or anything else supported by strtotime http://php.net/manual/en/function.strtotime.php
Leaving the date field empty will assume `now()`. So by default (without arguments) it will filter out future items.
Comment #3
queenvictoria commentedDoes anyone know--is the reason that testbot isn't looking at this because there are no tests written for it?
Comment #4
AlsTrying your filter, really useful considering that to skip content depending on its date is standard practice in data flows.
The filter appears in tamper, the configuration works. I can set the date, the system checks it upon save, the import results are the exact opposite if I check "invert".
However, I am not able to have the filter understand the date passed for the check. I have tried to import dates in the following formats (CSV import):
YYYY/MM/DD
YYYY-MM-DD
DD/MM/YYYY
DD-MM-YYYY
Time is never present.
The date configured in the filter falls in the middle of the imported nodes, so I should see some imported and some skipped. Instead, it is all or nothing (hence I understand that the "invert" option is working).
Thanks in advance for any help!
Comment #5
AlsAnswering my own question: the filter understands a date in Unix format (timestamp). Would be good to write it on screen in the description.
The standard Feeds Tamper package already has a plugin to convert an English date to timestamp. So, all I need now is a sed rule to tamper the CSV so my Italian dates (oh well!) become English.
Even if I am the only one who provided feedback in 9 months, I urge the maintainer of the module to include this date filter ASAP. It is really something you would expect to be able to filter on.
Comment #6
AlsComment #7
twistor commentedThis should really be more generic to apply.
Also, I wonder if it would be more useful to filter by number. Either greater, less than or equal to. And just convert the date to a timestamp using another plugin.
Comment #9
Marelmel commentedThank you for the patchs