summaryrefslogtreecommitdiff
path: root/_includes/functions/get_datetimes.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/functions/get_datetimes.html')
-rw-r--r--_includes/functions/get_datetimes.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/_includes/functions/get_datetimes.html b/_includes/functions/get_datetimes.html
new file mode 100644
index 0000000..4398fbf
--- /dev/null
+++ b/_includes/functions/get_datetimes.html
@@ -0,0 +1,18 @@
+{% if include.filter %}
+ {% assign filter = include.filter %}
+{% endif %}
+
+{% assign split_mark = '<|>' %}
+
+{% assign dates = '' %}
+{% for post in site.posts %}
+ {% assign name = post.date | date: filter %}
+ {% assign dates = dates | append: split_mark | append: name %}
+{% endfor %}
+
+{% assign return = dates
+ | remove_first: split_mark
+ | split: split_mark
+ | sort: self
+ | uniq %}
+