Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26977

Month and year not showing correctly

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    Description

      > var mydate1 = new Date()
      > var mydate2 = ISODate()
      > mydate1.toString()
      Thu Nov 10 2016 02:45:10 GMT-0500 (EST)
      > mydate2.toString()
      Thu Nov 10 2016 02:45:14 GMT-0500 (EST)
      ----------------------------------------------------------------------------------------------------
       
      > mydate1.getMonth()
      10
      > mydate2.getMonth()
      10
      > mydate1.getYear()
      116
      

      All the values shown above are wrong, Month should be 11 and year should be 2016

      Attachments

        Activity

          People

            kelsey.schubert@mongodb.com Kelsey Schubert
            guruskec@gmail.com guru rajan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: