<p>Thanks for asking about this, Cole!</p>

<p>There was a bug that was causing <code>rsortAs</code> to return erroneous results. The issue is fixed in the <strong>1.0</strong> release.</p>

<p><a href="http://michaelrog.com/craft/lagniappe/supersort" rel="nofollow">Grab yourself a fresh copy</a> and you should be squared away.</p>

CC BY-SA 3.0
2015-11-05T21:18:46.460Z
2015-11-05T21:18:46.460Z
Michael Rog
<p>I'm fetching entries from several different locales and merging them together into a single object.</p>

<p>I then want to sort these to be most recent entry shown first.
Using Supersort and the custom <code>sortAs</code> method I can get this to work showing entries in ascending date order:</p>

<pre><code>{% set sections = 'news' %} 
{% set locales = craft.i18n.getSiteLocales %}   
{% set pages = [] %}
{% for locale in locales %}
    {% set entries = craft.entries.section(sections).status(null).locale(locale.id).localeEnabled(false).find() %}  
    {% set pages = pages|merge(entries) %}
{% endfor %}        
{% set pagesSorted = pages | supersort('sortAs', '{ postDate.date }') %}
</code></pre>

<p>However, if I try to use the above with the custom <code>rsortAs</code> method then it does not work, just returning the entries in the order they occur within the pages object.</p>

<p>Any thoughts on what might be doing wrong?</p>

<entries><sorting><plugin-supersort>
Using Supersort with date field
# Using Supersort with date field

(Asked by: username_0 on 2015-11-04)

I'm fetching entries from several different locales and merging them together into a single object.
I then want to sort these to be most recent entry shown first.
Using Supersort and the custom sortAs method I can get this to work showing entries in ascending date order:
{% set sections = 'news' %} 
{% set locales = craft.i18n.getSiteLocales %}   
{% set pages = [] %}
{% for locale in locales %}
    {% set entries = craft.entries.section(sections).status(null).locale(locale.id).localeEnabled(false).find() %}  
    {% set pages = pages|merge(entries) %}
{% endfor %}        
{% set pagesSorted = pages | supersort('sortAs', '{ postDate.date }') %}

However, if I try to use the above with the custom rsortAs method then it does not work, just returning the entries in the order they occur within the pages object.
Any thoughts on what might be doing wrong?

**Tags:** entries, sorting, plugin-supersort


---

## 1 answers

### Answer by username_1 on 2015-11-05. Score: 3 | Accepted answer

Thanks for asking about this, Cole!

There was a bug that was causing `rsortAs` to return erroneous results. The issue is fixed in the **1.0** release.

[Grab yourself a fresh copy](http://michaelrog.com/craft/lagniappe/supersort) and you should be squared away.


---

