浏览代码

Add doc to parseDate function

BRAHIM 11 年之前
父节点
当前提交
5e70112700
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      src/js/validator/date.js

+ 12 - 0
src/js/validator/date.js

@@ -207,6 +207,18 @@
             };
         },
 
+        /**
+         * Return a date object after parsing the date string
+         *
+         * @param {String} date   The date string to parse
+         * @param {String} format The date format
+         * The format can be:
+         *   - date: Consist of DD, MM, YYYY parts which are separated by the separator option
+         *   - date and time:
+         *     The time can consist of h, m, s parts which are separated by :
+         * @param {String} separator The separator used to separate the date, month, and year
+         * @returns {Date}
+         */
         parseDate: function(date, format, separator) {
             var year = 0, month = 0, day = 0, minutes = 0, hours = 0, seconds = 0,
                 sections    = date.split(' '),