Index: filters/datesort.py |
diff --git a/filters/datesort.py b/filters/datesort.py |
index 9d4c6479de4eaa0dd360520a4906eb7513f53021..2d7f6ab4939571276b0c7706f2be7a8eed6e75cf 100644 |
--- a/filters/datesort.py |
+++ b/filters/datesort.py |
@@ -1,9 +1,2 @@ |
-import datetime, random |
- |
-def datesort(value, basedate="1970-01-01", column=0): |
- base = datetime.datetime.strptime(basedate, "%Y-%m-%d") |
- def randdiff(entry): |
- date = datetime.datetime.strptime(entry[column], "%Y-%m-%d") |
- diff = (date - base).days |
- return diff * 0.2 + random.randrange(diff) * 0.8 |
- return sorted(value, key=randdiff) |
+def datesort(collection): |
+ return sorted(collection, reverse=True) |