recherche

Maison  >  Questions et réponses  >  le corps du texte

javascript - Comment convertir le mois de la date en affichage anglais en js?

25/11/2016 12:19 converti au 25 décembre 2016 12:19

高洛峰高洛峰2866 Il y a quelques jours547

répondre à tous(2)je répondrai

  • 黄舟

    黄舟2017-05-19 10:39:04

    var monthsInEng = ['jan', 'feb', 'march'...];
    var date = new Date();
    console.log( 
       date.getDate() + 
       ' ' +
       monthsInEng[date.getMonth()] +
       ' ' + 
       date.getFullYear()

    );

    répondre
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-19 10:39:04

    Essayez-le

    var _time = new Date(2016,11,25,12,19);
    //var _format = _time.toDateString();
    //console.log(_format);
    
    //这样呢!
    var _format = new Date(Date.UTC(2016,11,25,12,19));
    console.log(_format);

    répondre
    0
  • Annulerrépondre