Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4292

Dates.newInstance() returns an incorrect year when the year is less than 100

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.2
    • 8.6.1
    • None
    • None
    • None

      Steps to Reproduce

      http://zkfiddle.org/sample/3u5ohi5/1-Dates-newInstance-returns-an-incorrect-year-when-the-year
      run the fiddle with 8.6.1

      Current Result

      if the input year is 99 (less then 100)
      the return year is 1999

      Expected feature Result

      should return 99

      Debug Info

      see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC
      the Date.UTC() behavior.
      Years between 0 and 99 are converted to a year in the 20th century (1900 + year); for example, 95 is converted to the year 1995.

            Leon03 Leon03
            Leon03 Leon03
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h