Sha256: 5d38a8b68f1dab88c78f42f45f0be9c1017a61e2f09d5dddc302f9b129540a56

Contents?: true

Size: 629 Bytes

Versions: 10

Compression:

Stored size: 629 Bytes

Contents

aggregate_hour:
    "function(doc) {
        d = new Date(doc.date* 1000);
        return {date:  (Date.parse((d.getMonth() + 1) + '/' + d.getDate() + '/' + d.getFullYear() + ' ' + d.getHours() + ':00:00') / 1000).toFixed(0)};
     }"

aggregate_day:
    "function(doc) {
        d = new Date(doc.date* 1000);
        return {date:   (Date.parse((d.getMonth() + 1) + '/' + d.getDate() + '/' + d.getFullYear() + ' 00::00') / 1000).toFixed(0)};
     }"

aggregate_month:
    "function(doc) {
    d = new Date(doc.date* 1000);
    return {date:   (Date.parse((d.getMonth() + 1) + '/1/' + d.getFullYear()) / 1000).toFixed(0)};
    }"

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gatoroid-0.2.13 lib/gator/javascript/functions.yml
gatoroid-0.2.12 lib/gator/javascript/functions.yml
gatoroid-0.2.11 lib/gator/javascript/functions.yml
gatoroid-0.2.10 lib/gator/javascript/functions.yml
gatoroid-0.2.9 lib/gator/javascript/functions.yml
gatoroid-0.2.8 lib/gator/javascript/functions.yml
gatoroid-0.2.7 lib/gator/javascript/functions.yml
gatoroid-0.2.6 lib/gator/javascript/functions.yml
gatoroid-0.2.5 lib/gator/javascript/functions.yml
gatoroid-0.2.4 lib/gator/javascript/functions.yml