XoopsModules25x/apcal

View on GitHub
assets/js/jscalendar/calendar.js

Summary

Maintainability
F
3 wks
Test Coverage

File calendar.js has 1567 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*  Copyright Mihai Bazon, 2002-2005  |  www.bazon.net/mishoo
 * -----------------------------------------------------------
 *
 * The DHTML Calendar, version 1.0 "It is happening again"
 *
Severity: Major
Found in assets/js/jscalendar/calendar.js - About 4 days to fix

    Function _init has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
    Open

    Calendar.prototype._init = function (firstDayOfWeek, date) {
        var today = new Date(),
            TY = today.getFullYear(),
            TM = today.getMonth(),
            TD = today.getDate();
    Severity: Minor
    Found in assets/js/jscalendar/calendar.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _keyEvent has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
    Open

    Calendar._keyEvent = function (ev) {
        var cal = window._dynarch_popupCalendar;
        if (!cal || cal.multiple)
            return false;
        (Calendar.is_ie) && (ev = window.event);
    Severity: Minor
    Found in assets/js/jscalendar/calendar.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function cellClick has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
    Open

    Calendar.cellClick = function (el, ev) {
        var cal = el.calendar;
        var closing = false;
        var newdate = false;
        var date = null;
    Severity: Minor
    Found in assets/js/jscalendar/calendar.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function create has 210 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Calendar.prototype.create = function (_par) {
        var parent = null;
        if (!_par) {
            // default parent is the document body, in which case we create
            // a popup calendar.
    Severity: Major
    Found in assets/js/jscalendar/calendar.js - About 1 day to fix

      Function parseDate has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
      Open

      Date.parseDate = function (str, fmt) {
          var today = new Date();
          var y = 0;
          var m = -1;
          var d = 0;
      Severity: Minor
      Found in assets/js/jscalendar/calendar.js - About 7 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function tableMouseOver has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
      Open

      Calendar.tableMouseOver = function (ev) {
          var cal = Calendar._C;
          if (!cal) {
              return;
          }
      Severity: Minor
      Found in assets/js/jscalendar/calendar.js - About 7 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function cellClick has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Calendar.cellClick = function (el, ev) {
          var cal = el.calendar;
          var closing = false;
          var newdate = false;
          var date = null;
      Severity: Major
      Found in assets/js/jscalendar/calendar.js - About 4 hrs to fix

        Function create has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

        Calendar.prototype.create = function (_par) {
            var parent = null;
            if (!_par) {
                // default parent is the document body, in which case we create
                // a popup calendar.
        Severity: Minor
        Found in assets/js/jscalendar/calendar.js - About 4 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function _keyEvent has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Calendar._keyEvent = function (ev) {
            var cal = window._dynarch_popupCalendar;
            if (!cal || cal.multiple)
                return false;
            (Calendar.is_ie) && (ev = window.event);
        Severity: Major
        Found in assets/js/jscalendar/calendar.js - About 4 hrs to fix

          Function _init has 104 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Calendar.prototype._init = function (firstDayOfWeek, date) {
              var today = new Date(),
                  TY = today.getFullYear(),
                  TM = today.getMonth(),
                  TD = today.getDate();
          Severity: Major
          Found in assets/js/jscalendar/calendar.js - About 4 hrs to fix

            Function hideShowCovered has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            Calendar.prototype.hideShowCovered = function () {
                if (!Calendar.is_ie && !Calendar.is_opera)
                    return;
                function getVisib(obj) {
                    var value = obj.style.visibility;
            Severity: Minor
            Found in assets/js/jscalendar/calendar.js - About 4 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function parseDate has 91 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Date.parseDate = function (str, fmt) {
                var today = new Date();
                var y = 0;
                var m = -1;
                var d = 0;
            Severity: Major
            Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix

              Function showAtElement has 82 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Calendar.prototype.showAtElement = function (el, opts) {
                  var self = this;
                  var p = Calendar.getAbsolutePos(el);
                  if (!opts || typeof opts != "string") {
                      this.showAt(p.x, p.y + el.offsetHeight);
              Severity: Major
              Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix

                Function tableMouseOver has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Calendar.tableMouseOver = function (ev) {
                    var cal = Calendar._C;
                    if (!cal) {
                        return;
                    }
                Severity: Major
                Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix

                  Function showAtElement has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Calendar.prototype.showAtElement = function (el, opts) {
                      var self = this;
                      var p = Calendar.getAbsolutePos(el);
                      if (!opts || typeof opts != "string") {
                          this.showAt(p.x, p.y + el.offsetHeight);
                  Severity: Minor
                  Found in assets/js/jscalendar/calendar.js - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function print has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Date.prototype.print = function (str) {
                      var m = this.getMonth();
                      var d = this.getDate();
                      var y = this.getFullYear();
                      var wn = this.getWeekNumber();
                  Severity: Minor
                  Found in assets/js/jscalendar/calendar.js - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function showYearsCombo has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Calendar.showYearsCombo = function (fwd) {
                      var cal = Calendar._C;
                      if (!cal) {
                          return false;
                      }
                  Severity: Minor
                  Found in assets/js/jscalendar/calendar.js - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function dayMouseDown has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Calendar.dayMouseDown = function (ev) {
                      var el = Calendar.getElement(ev);
                      if (el.disabled) {
                          return false;
                      }
                  Severity: Minor
                  Found in assets/js/jscalendar/calendar.js - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function print has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Date.prototype.print = function (str) {
                      var m = this.getMonth();
                      var d = this.getDate();
                      var y = this.getFullYear();
                      var wn = this.getWeekNumber();
                  Severity: Major
                  Found in assets/js/jscalendar/calendar.js - About 2 hrs to fix

                    Function tableMouseUp has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Calendar.tableMouseUp = function (ev) {
                        var cal = Calendar._C;
                        if (!cal) {
                            return false;
                        }
                    Severity: Minor
                    Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                      Function hideShowCovered has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Calendar.prototype.hideShowCovered = function () {
                          if (!Calendar.is_ie && !Calendar.is_opera)
                              return;
                          function getVisib(obj) {
                              var value = obj.style.visibility;
                      Severity: Minor
                      Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                        Function continuation_for_the_fucking_khtml_browser has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            Calendar.continuation_for_the_fucking_khtml_browser = function () {
                                var w = self.element.offsetWidth;
                                var h = self.element.offsetHeight;
                                self.element.style.display = "none";
                                var valign = opts.substr(0, 1);
                        Severity: Minor
                        Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                          Function tableMouseUp has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Calendar.tableMouseUp = function (ev) {
                              var cal = Calendar._C;
                              if (!cal) {
                                  return false;
                              }
                          Severity: Minor
                          Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function showYearsCombo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          Calendar.showYearsCombo = function (fwd) {
                              var cal = Calendar._C;
                              if (!cal) {
                                  return false;
                              }
                          Severity: Minor
                          Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                            Function dayMouseDown has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            Calendar.dayMouseDown = function (ev) {
                                var el = Calendar.getElement(ev);
                                if (el.disabled) {
                                    return false;
                                }
                            Severity: Minor
                            Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                              Function showMonthsCombo has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              Calendar.showMonthsCombo = function () {
                                  var cal = Calendar._C;
                                  if (!cal) {
                                      return false;
                                  }
                              Severity: Minor
                              Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                                Function _initMultipleDates has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                Calendar.prototype._initMultipleDates = function () {
                                    if (this.multiple) {
                                        for (var i in this.multiple) {
                                            var cell = this.datesCells[i];
                                            var d = this.multiple[i];
                                Severity: Minor
                                Found in assets/js/jscalendar/calendar.js - About 55 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Avoid deeply nested control flow statements.
                                Open

                                                    switch (K) {
                                                        case 37: // KEY left
                                                            if (--x >= 0)
                                                                ne = cal.ar_days[y][x];
                                                            else {
                                Severity: Major
                                Found in assets/js/jscalendar/calendar.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if (toolTip)
                                                          cell.title = toolTip;
                                  Severity: Major
                                  Found in assets/js/jscalendar/calendar.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (!ne.disabled)
                                                            Calendar.cellClick(ne);
                                                        else if (prev)
                                                            prevMonth();
                                                        else
                                    Severity: Major
                                    Found in assets/js/jscalendar/calendar.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if (/disabled/i.test(status))
                                                              cell.disabled = true;
                                      Severity: Major
                                      Found in assets/js/jscalendar/calendar.js - About 45 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                            if (ev.ctrlKey) {
                                                switch (K) {
                                                    case 37: // KEY left
                                                        act && Calendar.cellClick(cal._nav_pm);
                                                        break;
                                        Severity: Major
                                        Found in assets/js/jscalendar/calendar.js - About 40 mins to fix

                                          Function isRelated has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          Calendar.isRelated = function (el, evt) {
                                              var related = evt.relatedTarget;
                                              if (!related) {
                                                  var type = evt.type;
                                                  if (type == "mouseover") {
                                          Severity: Minor
                                          Found in assets/js/jscalendar/calendar.js - About 35 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Function _toggleMultipleDate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          Calendar.prototype._toggleMultipleDate = function (date) {
                                              if (this.multiple) {
                                                  var ds = date.print("%Y%m%d");
                                                  var cell = this.datesCells[ds];
                                                  if (cell) {
                                          Severity: Minor
                                          Found in assets/js/jscalendar/calendar.js - About 35 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Function dayMouseOver has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          Calendar.dayMouseOver = function (ev) {
                                              var el = Calendar.getElement(ev);
                                              if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
                                                  return false;
                                              }
                                          Severity: Minor
                                          Found in assets/js/jscalendar/calendar.js - About 35 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Function showMonthsCombo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          Calendar.showMonthsCombo = function () {
                                              var cal = Calendar._C;
                                              if (!cal) {
                                                  return false;
                                              }
                                          Severity: Minor
                                          Found in assets/js/jscalendar/calendar.js - About 35 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Avoid too many return statements within this function.
                                          Open

                                                              return false;
                                          Severity: Major
                                          Found in assets/js/jscalendar/calendar.js - About 30 mins to fix

                                            FIXME found
                                            Open

                                            // FIXME: the following 2 functions totally suck, are useless and should be replaced immediately.
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %R : the time in 24-hour notation %H:%M
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %E, %F, %G, %g, %h (man strftime)
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %T : the time in 24-hour notation (%H:%M:%S)
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %c : preferred date and time representation for the current locale
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %D : american date style: %m/%d/%y
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                                // FIXME: this should be removed as soon as lang files get updated!
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %X : preferred time representation for the current locale without the date
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %r : the time in am/pm notation %I:%M:%S %p
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            FIXME found
                                            Open

                                                // FIXME: %x : preferred date representation for the current locale without the time
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js by fixme

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    if (year) {
                                                        if (year.year != cal.date.getFullYear()) {
                                                            if (cal.hilitedYear) {
                                                                Calendar.removeClass(cal.hilitedYear, "hilite");
                                                            }
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 428..456

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 108.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                if (mon) {
                                                    if (mon.month != cal.date.getMonth()) {
                                                        if (cal.hilitedMonth) {
                                                            Calendar.removeClass(cal.hilitedMonth, "hilite");
                                                        }
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 443..455

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 108.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                if (cd.navtype < 0)
                                                    s.left = cd.offsetLeft + "px";
                                                else {
                                                    var mcw = mc.offsetWidth;
                                                    if (typeof mcw == "undefined")
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 315..323

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 96.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    switch (halign) {
                                                        case "L":
                                                            p.x -= w;
                                                            break;
                                                        case "R":
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 1417..1432

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 96.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    if (cd.navtype < 0)
                                                        s.left = cd.offsetLeft + "px";
                                                    else {
                                                        var ycw = yc.offsetWidth;
                                                        if (typeof ycw == "undefined")
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 270..278

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 96.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    switch (valign) {
                                                        case "T":
                                                            p.y -= h;
                                                            break;
                                                        case "B":
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 1434..1449

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 96.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                if (mon) {
                                                    date = new Date(cal.date);
                                                    if (mon.month != date.getMonth()) {
                                                        date.setMonth(mon.month);
                                                        cal.setDate(date);
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 2 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 360..368

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 88.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    if (year) {
                                                        date = new Date(cal.date);
                                                        if (year.year != date.getFullYear()) {
                                                            date.setFullYear(year.year);
                                                            cal.setDate(date);
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 2 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 350..369

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 88.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                            for (j = 0; j < 12; ++j) {
                                                                if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
                                                                    m = j;
                                                                    break;
                                                                }
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 2 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 1675..1680

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 83.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                        for (j = 0; j < 12; ++j) {
                                                            if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
                                                                t = j;
                                                                break;
                                                            }
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 2 hrs to fix
                                            assets/js/jscalendar/calendar.js on lines 1634..1639

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 83.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                            Calendar.findYear = function (el) {
                                                if (typeof el.year != "undefined") {
                                                    return el;
                                                } else if (typeof el.parentNode.year != "undefined") {
                                                    return el.parentNode;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 233..240

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 69.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                            Calendar.findMonth = function (el) {
                                                if (typeof el.month != "undefined") {
                                                    return el;
                                                } else if (typeof el.parentNode.month != "undefined") {
                                                    return el.parentNode;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 242..249

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 69.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                            if (/pm/i.test(a[i]) && hr < 12)
                                                                hr += 12;
                                                            else if (/am/i.test(a[i]) && hr >= 12)
                                                                hr -= 12;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 904..907

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 63.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                                if (/pm/i.test(AP.innerHTML) && h < 12)
                                                                    h += 12;
                                                                else if (/am/i.test(AP.innerHTML) && h == 12)
                                                                    h = 0;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 1651..1654

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 63.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                if (Calendar.is_ie) {
                                                    posY = window.event.clientY + document.body.scrollTop;
                                                    posX = window.event.clientX + document.body.scrollLeft;
                                                } else {
                                                    posY = ev.clientY + window.scrollY;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 473..479

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 58.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                if (Calendar.is_ie) {
                                                    posY = window.event.clientY + document.body.scrollTop;
                                                    posX = window.event.clientX + document.body.scrollLeft;
                                                } else {
                                                    posX = ev.pageX;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 1575..1581

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 58.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                            function prevMonth() {
                                                                var date = new Date(cal.date);
                                                                date.setDate(date.getDate() - step);
                                                                cal.setDate(date);
                                                            };
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 1016..1020

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 56.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                            function nextMonth() {
                                                                var date = new Date(cal.date);
                                                                date.setDate(date.getDate() + step);
                                                                cal.setDate(date);
                                                            };
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 1011..1015

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 56.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                                    case 37: // KEY left
                                                                        if (--x >= 0)
                                                                            ne = cal.ar_days[y][x];
                                                                        else {
                                                                            x = 6;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 1040..1048

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 55.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                                    case 39: // KEY right
                                                                        if (++x < 7)
                                                                            ne = cal.ar_days[y][x];
                                                                        else {
                                                                            x = 0;
                                            Severity: Major
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                                            assets/js/jscalendar/calendar.js on lines 1023..1031

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 55.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    for (var i = 12; i > 0;) {
                                                        ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
                                                    }
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 55 mins to fix
                                            assets/js/jscalendar/calendar.js on lines 66..68

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 53.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                    for (var i = 8; i > 0;) {
                                                        ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
                                                    }
                                            Severity: Minor
                                            Found in assets/js/jscalendar/calendar.js and 1 other location - About 55 mins to fix
                                            assets/js/jscalendar/calendar.js on lines 74..76

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 53.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            There are no issues that match your filters.

                                            Category
                                            Status