Path: csiph.com!aioe.org!.POSTED!not-for-mail From: son Newsgroups: it.comp.lang.javascript Subject: ordinare date locali Date: Sun, 25 Nov 2018 11:35:14 +0100 Organization: Aioe.org NNTP Server Lines: 15 Message-ID: NNTP-Posting-Host: mWls8UrJ+CRbWGN2Lykw5w.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 Content-Language: it_IT X-Notice: Filtered by postfilter v. 0.8.3 X-Mozilla-News-Host: news://nntp.aioe.org:119 Xref: csiph.com it.comp.lang.javascript:8282 Ho delle date "lunghe" in italiano, che, tanto per fare un esempio, posso immaginare in un array: var d=["2 gen 2019", "4 mar 2019", "3 feb 2019", "1 dic 2018"] Ora avrei bisogno di ordinare l'array d in base alla data. d.sort(function(a,b){return ...}) Cosa posso inserire nella funzione di ordinamento? In altre parole, c'è un metodo che mi permette di convertire la data "lunga" locale in un formato di data direttamente confrontabile? Grazie.