|
1755 | 1755 | * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype, |
1756 | 1756 | * it will return false for all objects |
1757 | 1757 | */ |
1758 | | - var isEmptyObject = function(obj) { |
| 1758 | + function isEmptyObject(obj) { |
1759 | 1759 | var prop; |
1760 | 1760 | for (prop in obj) { |
1761 | 1761 | if (obj.hasOwnProperty(obj)) { |
|
1768 | 1768 | /* |
1769 | 1769 | * jQuery extend now ignores nulls! |
1770 | 1770 | */ |
1771 | | - var extendRemove = function(target, props) { |
| 1771 | + function extendRemove(target, props) { |
1772 | 1772 | $.extend(target, props); |
1773 | 1773 | for (var name in props) { |
1774 | 1774 | if (props[name] === null || props[name] === undefined) { |
|
1782 | 1782 | * Determine by the time format which units are supported |
1783 | 1783 | * Returns an object of booleans for each unit |
1784 | 1784 | */ |
1785 | | - var detectSupport = function(timeFormat){ |
| 1785 | + function detectSupport(timeFormat){ |
1786 | 1786 | var tf = timeFormat.replace(/\'.*?\'/g,'').toLowerCase(), // removes literals |
1787 | 1787 | isIn = function(f, t){ // does the format contain the token? |
1788 | 1788 | return f.indexOf(t) !== -1? true:false; |
|
1803 | 1803 | * Converts 24 hour format into 12 hour |
1804 | 1804 | * Returns 12 hour without leading 0 |
1805 | 1805 | */ |
1806 | | - var convert24to12 = function(hour) { |
| 1806 | + function convert24to12(hour) { |
1807 | 1807 | if (hour > 12) { |
1808 | 1808 | hour = hour - 12; |
1809 | 1809 | } |
|
1820 | 1820 | * Throws exception when date can't be parsed |
1821 | 1821 | * Returns [dateString, timeString] |
1822 | 1822 | */ |
1823 | | - var splitDateTime = function(dateFormat, dateTimeString, dateSettings, timeSettings) { |
| 1823 | + function splitDateTime(dateFormat, dateTimeString, dateSettings, timeSettings) { |
1824 | 1824 | try { |
1825 | 1825 | // The idea is to get the number separator occurances in datetime and the time format requested (since time has |
1826 | 1826 | // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split. |
|
1868 | 1868 | * date - parsed date without time (type Date) |
1869 | 1869 | * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional |
1870 | 1870 | */ |
1871 | | - var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) { |
| 1871 | + function parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) { |
1872 | 1872 | var date; |
1873 | 1873 | var splitRes = splitDateTime(dateFormat, dateTimeString, dateSettings, timeSettings); |
1874 | 1874 | date = $.datepicker._base_parseDate(dateFormat, splitRes[0], dateSettings); |
|
1893 | 1893 | /* |
1894 | 1894 | * Internal function to set timezone_select to the local timezone |
1895 | 1895 | */ |
1896 | | - var selectLocalTimezone = function(tp_inst, date) { |
| 1896 | + function selectLocalTimezone(tp_inst, date) { |
1897 | 1897 | if (tp_inst && tp_inst.timezone_select) { |
1898 | 1898 | var now = typeof date !== 'undefined' ? date : new Date(); |
1899 | 1899 | tp_inst.timezone_select.val(now.getTimezoneOffset()*-1); |
|
0 commit comments