[{"data":1,"prerenderedAt":175},["ShallowReactive",2],{"project-4494884":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":33,"aspects":34,"strip":36,"post_text":30,"what":38,"said":71,"maker_in_thread":107,"shape":113,"grid":117,"attempts":137,"same_week":138,"maker_shows":167,"maker_hidden":168,"reader_version":169,"card":170},"4494884","sortByTimeAgo.js","A jQuery plugin I'm working on to sort by time ago.","title","Show HN: sortByTimeAgo.js - A jQuery plugin I'm working on to sort by time ago.","https:\u002F\u002Fgithub.com\u002Fcjstewart88\u002FsortByTimeAgo","github.com","cjstewart88",1347163413,2012,10,9,1337,1677,80,"shown","languages","javascript library","library",[24,25,26,27,28],"javascript","sort","time ago","jquery","date sorting","quiet",null,{"positive":32,"neutral":32,"mixed":32,"critical":33},0,3,{"design":35},{"positive":32,"critical":33},[32,32,37,37,32,32,37,32,32],1,{"problem":39,"audience":30,"pricing":30,"motivation":49,"time_to_build":30,"stack":54,"openness":69,"stage":70,"team_size":70},{"value":40,"source":41,"evidence":42},"Sorting items that only carry relative 'time ago' text instead of timestamps.","maker",[43,46],{"id":44,"by":11,"text":45},"4495598","This is the API that made me do it: http:\u002F\u002Fapi.ihackernews.com\u002Fpage?format=jsonp I was using it along with reddits api to sort posts together on this website,…",{"id":47,"by":11,"text":48},"4495603","I would never make an API that returns time ago and force my users to sort that way. This was made because: http:\u002F\u002Fapi.ihackernews.com\u002Fpage?format=jsonp",{"value":50,"source":41,"evidence":51},"Built to sort posts from the ihackernews API, which only returns 'postedAgo' text rather than timestamps.",[52,53],{"id":44,"by":11,"text":45},{"id":47,"by":11,"text":48},[55,61],{"value":56,"source":41,"evidence":57},"JavaScript",[58],{"id":59,"by":11,"text":60},"4495602","You're probably right, this should not depend on jQuery. I'm the most comfortable with it and decided to just roll with it this way. I'll branch out and try making it not…",{"value":62,"source":41,"evidence":63},"jQuery",[64,65],{"id":59,"by":11,"text":60},{"id":66,"by":67,"text":68},"4495116","gbraad","Seems to be a wrong approach to me. Instead of using a timestamp it is sorted against 'English' indexof-ed strings. I would expect human-readable date formats are done afterwords…","open_source","unknown",{"praise":72,"objections":73,"requests":89,"questions":98,"alternatives":106},[],[74,82],{"value":75,"source":76,"evidence":77},"Sorting by English relative strings is the wrong approach; sort on timestamps instead.","commenter",[78,79],{"id":66,"by":67,"text":68},{"id":80,"by":67,"text":81},"4496009","Had never seen this unofficial API. Ugh, postedAgo?! Should be a timestamp... As he mentions, it should be avail. Ask ronneroller to change\u002Fadd it ;-)",{"value":83,"source":76,"evidence":84},"Should not depend on jQuery; it is a plain function usable in node or elsewhere.",[85],{"id":86,"by":87,"text":88},"4495079","dangrossman","Thanks for sharing this. But why is it a jQuery plugin? It's a single function that iterates over an array, just as suited for a library or node.js module as a webpage; a…",[90,94],{"value":91,"source":76,"evidence":92},"Remove the jQuery dependency.",[93],{"id":86,"by":87,"text":88},{"value":95,"source":76,"evidence":96},"Ask the API maintainer to add a real timestamp field.",[97],{"id":80,"by":67,"text":81},[99],{"value":100,"source":76,"evidence":101},"Which third-party APIs return time-ago text without standard date attributes?",[102],{"id":103,"by":104,"text":105},"4495077","ibejoeb","Out of curiosity, what third-party APIs are you using that return \"time ago\" attributes but no standard date attribute (e.g, ISO 8601, RFC 822)? I hope never to have that…",[],{"comments":108,"answered":33,"key":109},4,[110,111,112],{"id":44,"text":45},{"id":47,"text":48},{"id":59,"text":60},{"commenters":114,"max_depth":108,"maker_replies":108,"first_comment_mins":115,"lifespan_hours":116},5,118,15,[118,120,122,124,125,127,129,132,134],[103,32,32,119,104,32],"commenter\u002Fneutral\u002Fidea",[44,32,32,121,11,37],"maker\u002Fneutral\u002Fidea",[86,37,37,123,87,32],"project\u002Fcritical\u002Fdesign",[66,37,37,123,67,32],[47,37,32,126,11,37],"commenter\u002Fneutral\u002Fdesign",[80,37,32,128,67,32],"other\u002Fneutral\u002Fnone",[130,37,37,123,131,32],"4495156","skrebbel",[59,37,32,133,11,37],"project\u002Fneutral\u002Fdesign",[135,37,32,136,11,37],"4496645","project\u002Fpositive\u002Fdesign",[],[139,144,149,153,157,162],{"id":140,"name":141,"points":142,"category":143},"4499435","aboutmybrowser.com",521,"dev_tools",{"id":145,"name":146,"points":147,"category":148},"4496647","MemStash",170,"productivity",{"id":150,"name":151,"points":152,"category":148},"4488910","Foreman",153,{"id":154,"name":155,"points":156,"category":148},"4488432","my personal news reader",108,{"id":158,"name":159,"points":160,"category":161},"4489288","Forward",107,"web_saas",{"id":163,"name":164,"points":165,"category":166},"4504639","Sleepio",94,"consumer_social",8,false,"v2",{"id":171,"name":5,"line":6,"ai":168,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":172,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":173,"url":9,"mix":174,"praise":-1,"objection":75,"sub":21},4494884,[24,25,26,27,28],"001100100",[32,32,32,33],1793990885009]