This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$codes = [ | |
'ab' => 'Abkhazian', | |
'aa' => 'Afar', | |
'af' => 'Afrikaans', | |
'ak' => 'Akan', | |
'sq' => 'Albanian', | |
'am' => 'Amharic', | |
'ar' => 'Arabic', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = [], | |
now = new Date().getTime(); | |
root.hits.hits.forEach(function(hit) { | |
var d = new Date(), | |
ts = hit.fields.expired_at_de * 1000; | |
d.setTime(ts); | |
var diffInHours = (now - ts) / 1000.0 / 60.0 / 60.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// found here http://forums.shopify.com/categories/2/posts/29259 | |
var getOrdinal = function(n) { | |
var s=["th","st","nd","rd"], | |
v=n%100; | |
return n+(s[(v-20)%10]||s[v]||s[0]); | |
} |