Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-697

today.getYear() -> 110 not 2010

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 0.10.1
    • None
    • JavaScript View Server
    • windows NT, couch-0.11.0b905538

    Description

      Simple test:

      function(doc) {
      var today = new Date();
      var month = new Date(today.getYear(), today.getMonth(),1);
      emit(today.getYear(), month);
      }

      results in :

      110
      ID: 9eb7affe00e4b705afa4679fa70c5938 "0110-03-01T05:00:00.000Z"
      110
      ID: 9eb7affe00e4b705afa4679fa70c53ec "0110-03-01T05:00:00.000Z"
      110
      ID: 9eb7affe00e4b705afa4679fa70c4c93 "0110-03-01T05:00:00.000Z"
      110
      ID: 9eb7affe00e4b705afa4679fa70c3d13 "0110-03-01T05:00:00.000Z"
      110
      ID: 9eb7affe00e4b705afa4679fa70c333e "0110-03-01T05:00:00.000Z"

      Using Opera:

      javascript:var today= new Date(); today.getYear();

      Results in:

      2010

      Attachments

        Activity

          People

            Unassigned Unassigned
            thanos thanos vassilakis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: