← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15019: added jquery.calendar, and a very basic beginning of a period generator, calendars will be condit...

 

------------------------------------------------------------
revno: 15019
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-04-27 19:47:21 +0545
message:
  added jquery.calendar, and a very basic beginning of a period generator, calendars will be conditionally included based on system setting
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.coptic.min.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.ethiopian.min.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.islamic.min.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.julian.min.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.min.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.nepali.min.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.plus.min.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dhis2.util.namespace('dhis2.period');
+
+dhis2.period.DATE_FORMAT = "yyyy-mm-dd";
+
+dhis2.period.generateMonthlyPeriods = function( cal, offset ) {
+  var year = cal.today().year() - offset;
+
+  var periods = [];
+
+  for( var month = 1; month <= cal.monthsInYear(year); month++ ) {
+    var startDate = cal.newDate(year, month, 1);
+    var endDate = cal.newDate(startDate).set(startDate.daysInMonth(month), 'd');
+
+    var period = {};
+    period['startDate'] = startDate.formatDate(dhis2.period.DATE_FORMAT);
+    period['endDate'] = endDate.formatDate(dhis2.period.DATE_FORMAT);
+    period['name'] = startDate.formatDate("MM yyyy");
+    period['id'] = 'Monthly_' + period['startDate'];
+    period['iso'] = startDate.formatDate("yyyymm");
+
+    periods.push(period);
+  }
+
+  return periods;
+};

=== added directory 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar'
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.coptic.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.coptic.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.coptic.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Coptic calendar for jQuery v1.2.1.
+   Written by Keith Wood (kbwood{at}iinet.com.au) February 2010.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){function CopticCalendar(a){this.local=this.regional[a||'']||this.regional['']}CopticCalendar.prototype=new $.calendars.baseCalendar;$.extend(CopticCalendar.prototype,{name:'Coptic',jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:false,minMonth:1,firstMonth:1,minDay:1,regional:{'':{name:'Coptic',epochs:['BAM','AM'],monthNames:['Thout','Paopi','Hathor','Koiak','Tobi','Meshir','Paremhat','Paremoude','Pashons','Paoni','Epip','Mesori','Pi Kogi Enavot'],monthNamesShort:['Tho','Pao','Hath','Koi','Tob','Mesh','Pat','Pad','Pash','Pao','Epi','Meso','PiK'],dayNames:['Tkyriaka','Pesnau','Pshoment','Peftoou','Ptiou','Psoou','Psabbaton'],dayNamesShort:['Tky','Pes','Psh','Pef','Pti','Pso','Psa'],dayNamesMin:['Tk','Pes','Psh','Pef','Pt','Pso','Psa'],dateFormat:'dd/mm/yyyy',firstDay:0,isRTL:false}},leapYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear);var a=b.year()+(b.year()<0?1:0);return a%4==3||a%4==-1},monthsInYear:function(a){this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);return 13},weekOfYear:function(a,b,c){var d=this.newDate(a,b,c);d.add(-d.dayOfWeek(),'d');return Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(a,b){var c=this._validate(a,b,this.minDay,$.calendars.local.invalidMonth);return this.daysPerMonth[c.month()-1]+(c.month()==13&&this.leapYear(c.year())?1:0)},weekDay:function(a,b,c){return(this.dayOfWeek(a,b,c)||7)<6},toJD:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate);a=d.year();if(a<0){a++}return d.day()+(d.month()-1)*30+(a-1)*365+Math.floor(a/4)+this.jdEpoch-1},fromJD:function(a){var c=Math.floor(a)+0.5-this.jdEpoch;var b=Math.floor((c-Math.floor((c+366)/1461))/365)+1;if(b<=0){b--}c=Math.floor(a)+0.5-this.newDate(b,1,1).toJD();var d=Math.floor(c/30)+1;var e=c-(d-1)*30+1;return this.newDate(b,d,e)}});$.calendars.calendars.coptic=CopticCalendar})(jQuery);
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.ethiopian.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.ethiopian.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.ethiopian.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Ethiopian calendar for jQuery v1.2.1.
+   Written by Keith Wood (kbwood{at}iinet.com.au) February 2010.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){function EthiopianCalendar(a){this.local=this.regional[a||'']||this.regional['']}EthiopianCalendar.prototype=new $.calendars.baseCalendar;$.extend(EthiopianCalendar.prototype,{name:'Ethiopian',jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:false,minMonth:1,firstMonth:1,minDay:1,regional:{'':{name:'Ethiopian',epochs:['BEE','EE'],monthNames:['Meskerem','Tikemet','Hidar','Tahesas','Tir','Yekatit','Megabit','Miazia','Genbot','Sene','Hamle','Nehase','Pagume'],monthNamesShort:['Mes','Tik','Hid','Tah','Tir','Yek','Meg','Mia','Gen','Sen','Ham','Neh','Pag'],dayNames:['Ehud','Segno','Maksegno','Irob','Hamus','Arb','Kidame'],dayNamesShort:['Ehu','Seg','Mak','Iro','Ham','Arb','Kid'],dayNamesMin:['Eh','Se','Ma','Ir','Ha','Ar','Ki'],dateFormat:'dd/mm/yyyy',firstDay:0,isRTL:false}},leapYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear);var a=b.year()+(b.year()<0?1:0);return a%4==3||a%4==-1},monthsInYear:function(a){this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);return 13},weekOfYear:function(a,b,c){var d=this.newDate(a,b,c);d.add(-d.dayOfWeek(),'d');return Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(a,b){var c=this._validate(a,b,this.minDay,$.calendars.local.invalidMonth);return this.daysPerMonth[c.month()-1]+(c.month()==13&&this.leapYear(c.year())?1:0)},weekDay:function(a,b,c){return(this.dayOfWeek(a,b,c)||7)<6},toJD:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate);a=d.year();if(a<0){a++}return d.day()+(d.month()-1)*30+(a-1)*365+Math.floor(a/4)+this.jdEpoch-1},fromJD:function(a){var c=Math.floor(a)+0.5-this.jdEpoch;var b=Math.floor((c-Math.floor((c+366)/1461))/365)+1;if(b<=0){b--}c=Math.floor(a)+0.5-this.newDate(b,1,1).toJD();var d=Math.floor(c/30)+1;var e=c-(d-1)*30+1;return this.newDate(b,d,e)}});$.calendars.calendars.ethiopian=EthiopianCalendar})(jQuery);
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.islamic.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.islamic.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.islamic.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Islamic calendar for jQuery v1.2.1.
+   Written by Keith Wood (kbwood{at}iinet.com.au) August 2009.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){function IslamicCalendar(a){this.local=this.regional[a||'']||this.regional['']}IslamicCalendar.prototype=new $.calendars.baseCalendar;$.extend(IslamicCalendar.prototype,{name:'Islamic',jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:false,minMonth:1,firstMonth:1,minDay:1,regional:{'':{name:'Islamic',epochs:['BH','AH'],monthNames:['Muharram','Safar','Rabi\' al-awwal','Rabi\' al-thani','Jumada al-awwal','Jumada al-thani','Rajab','Sha\'aban','Ramadan','Shawwal','Dhu al-Qi\'dah','Dhu al-Hijjah'],monthNamesShort:['Muh','Saf','Rab1','Rab2','Jum1','Jum2','Raj','Sha\'','Ram','Shaw','DhuQ','DhuH'],dayNames:['Yawm al-ahad','Yawm al-ithnayn','Yawm ath-thulaathaa\'','Yawm al-arbi\'aa\'','Yawm al-khamīs','Yawm al-jum\'a','Yawm as-sabt'],dayNamesShort:['Aha','Ith','Thu','Arb','Kha','Jum','Sab'],dayNamesMin:['Ah','It','Th','Ar','Kh','Ju','Sa'],dateFormat:'yyyy/mm/dd',firstDay:6,isRTL:false}},leapYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear);return(b.year()*11+14)%30<11},weekOfYear:function(a,b,c){var d=this.newDate(a,b,c);d.add(-d.dayOfWeek(),'d');return Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(a){return(this.leapYear(a)?355:354)},daysInMonth:function(a,b){var c=this._validate(a,b,this.minDay,$.calendars.local.invalidMonth);return this.daysPerMonth[c.month()-1]+(c.month()==12&&this.leapYear(c.year())?1:0)},weekDay:function(a,b,c){return this.dayOfWeek(a,b,c)!=5},toJD:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate);a=d.year();b=d.month();c=d.day();a=(a<=0?a+1:a);return c+Math.ceil(29.5*(b-1))+(a-1)*354+Math.floor((3+(11*a))/30)+this.jdEpoch-1},fromJD:function(a){a=Math.floor(a)+0.5;var b=Math.floor((30*(a-this.jdEpoch)+10646)/10631);b=(b<=0?b-1:b);var c=Math.min(12,Math.ceil((a-29-this.toJD(b,1,1))/29.5)+1);var d=a-this.toJD(b,c,1)+1;return this.newDate(b,c,d)}});$.calendars.calendars.islamic=IslamicCalendar})(jQuery);
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.julian.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.julian.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.julian.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Julian calendar for jQuery v1.2.1.
+   Written by Keith Wood (kbwood{at}iinet.com.au) August 2009.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){function JulianCalendar(a){this.local=this.regional[a||'']||this.regional['']}JulianCalendar.prototype=new $.calendars.baseCalendar;$.extend(JulianCalendar.prototype,{name:'Julian',jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:false,minMonth:1,firstMonth:1,minDay:1,regional:{'':{name:'Julian',epochs:['BC','AD'],monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dateFormat:'mm/dd/yyyy',firstDay:0,isRTL:false}},leapYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear);var a=(b.year()<0?b.year()+1:b.year());return(a%4)==0},weekOfYear:function(a,b,c){var d=this.newDate(a,b,c);d.add(4-(d.dayOfWeek()||7),'d');return Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(a,b){var c=this._validate(a,b,this.minDay,$.calendars.local.invalidMonth);return this.daysPerMonth[c.month()-1]+(c.month()==2&&this.leapYear(c.year())?1:0)},weekDay:function(a,b,c){return(this.dayOfWeek(a,b,c)||7)<6},toJD:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate);a=d.year();b=d.month();c=d.day();if(a<0){a++}if(b<=2){a--;b+=12}return Math.floor(365.25*(a+4716))+Math.floor(30.6001*(b+1))+c-1524.5},fromJD:function(f){var a=Math.floor(f+0.5);var b=a+1524;var c=Math.floor((b-122.1)/365.25);var d=Math.floor(365.25*c);var e=Math.floor((b-d)/30.6001);var g=e-Math.floor(e<14?1:13);var h=c-Math.floor(g>2?4716:4715);var i=b-d-Math.floor(30.6001*e);if(h<=0){h--}return this.newDate(h,g,i)}});$.calendars.calendars.julian=JulianCalendar})(jQuery);
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Calendars for jQuery v1.2.1.
+   Written by Keith Wood (kbwood{at}iinet.com.au) August 2009.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){function Calendars(){this.regional=[];this.regional['']={invalidCalendar:'Calendar {0} not found',invalidDate:'Invalid {0} date',invalidMonth:'Invalid {0} month',invalidYear:'Invalid {0} year',differentCalendars:'Cannot mix {0} and {1} dates'};this.local=this.regional[''];this.calendars={};this._localCals={}}$.extend(Calendars.prototype,{instance:function(a,b){a=(a||'gregorian').toLowerCase();b=b||'';var c=this._localCals[a+'-'+b];if(!c&&this.calendars[a]){c=new this.calendars[a](b);this._localCals[a+'-'+b]=c}if(!c){throw(this.local.invalidCalendar||this.regional[''].invalidCalendar).replace(/\{0\}/,a)}return c},newDate:function(a,b,c,d,e){d=(a!=null&&a.year?a.calendar():(typeof d=='string'?this.instance(d,e):d))||this.instance();return d.newDate(a,b,c)}});function CDate(a,b,c,d){this._calendar=a;this._year=b;this._month=c;this._day=d;if(this._calendar._validateLevel==0&&!this._calendar.isValid(this._year,this._month,this._day)){throw($.calendars.local.invalidDate||$.calendars.regional[''].invalidDate).replace(/\{0\}/,this._calendar.local.name)}}function pad(a,b){a=''+a;return'000000'.substring(0,b-a.length)+a}$.extend(CDate.prototype,{newDate:function(a,b,c){return this._calendar.newDate((a==null?this:a),b,c)},year:function(a){return(arguments.length==0?this._year:this.set(a,'y'))},month:function(a){return(arguments.length==0?this._month:this.set(a,'m'))},day:function(a){return(arguments.length==0?this._day:this.set(a,'d'))},date:function(a,b,c){if(!this._calendar.isValid(a,b,c)){throw($.calendars.local.invalidDate||$.calendars.regional[''].invalidDate).replace(/\{0\}/,this._calendar.local.name)}this._year=a;this._month=b;this._day=c;return this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(a,b){return this._calendar.add(this,a,b)},set:function(a,b){return this._calendar.set(this,a,b)},compareTo:function(a){if(this._calendar.name!=a._calendar.name){throw($.calendars.local.differentCalendars||$.calendars.regional[''].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name)}var c=(this._year!=a._year?this._year-a._year:this._month!=a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day);return(c==0?0:(c<0?-1:+1))},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?'-':'')+pad(Math.abs(this.year()),4)+'-'+pad(this.month(),2)+'-'+pad(this.day(),2)}});function BaseCalendar(){this.shortYearCutoff='+10'}$.extend(BaseCalendar.prototype,{_validateLevel:0,newDate:function(a,b,c){if(a==null){return this.today()}if(a.year){this._validate(a,b,c,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);c=a.day();b=a.month();a=a.year()}return new CDate(this,a,b,c)},today:function(){return this.fromJSDate(new Date())},epoch:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);return(b.year()<0?this.local.epochs[0]:this.local.epochs[1])},formatYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);return(b.year()<0?'-':'')+pad(Math.abs(b.year()),4)},monthsInYear:function(a){this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);return 12},monthOfYear:function(a,b){var c=this._validate(a,b,this.minDay,$.calendars.local.invalidMonth||$.calendars.regional[''].invalidMonth);return(c.month()+this.monthsInYear(c)-this.firstMonth)%this.monthsInYear(c)+this.minMonth},fromMonthOfYear:function(a,b){var m=(b+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;this._validate(a,m,this.minDay,$.calendars.local.invalidMonth||$.calendars.regional[''].invalidMonth);return m},daysInYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);return(this.leapYear(b)?366:365)},dayOfYear:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);return d.toJD()-this.newDate(d.year(),this.fromMonthOfYear(d.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);return(Math.floor(this.toJD(d))+2)%this.daysInWeek()},extraInfo:function(a,b,c){this._validate(a,b,c,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);return{}},add:function(a,b,c){this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);return this._correctAdd(a,this._add(a,b,c),b,c)},_add:function(c,f,g){this._validateLevel++;if(g=='d'||g=='w'){var h=c.toJD()+f*(g=='w'?this.daysInWeek():1);var d=c.calendar().fromJD(h);this._validateLevel--;return[d.year(),d.month(),d.day()]}try{var y=c.year()+(g=='y'?f:0);var m=c.monthOfYear()+(g=='m'?f:0);var d=c.day();var i=function(a){while(m<a.minMonth){y--;m+=a.monthsInYear(y)}var b=a.monthsInYear(y);while(m>b-1+a.minMonth){y++;m-=b;b=a.monthsInYear(y)}};if(g=='y'){if(c.month()!=this.fromMonthOfYear(y,m)){m=this.newDate(y,c.month(),this.minDay).monthOfYear()}m=Math.min(m,this.monthsInYear(y));d=Math.min(d,this.daysInMonth(y,this.fromMonthOfYear(y,m)))}else if(g=='m'){i(this);d=Math.min(d,this.daysInMonth(y,this.fromMonthOfYear(y,m)))}var j=[y,this.fromMonthOfYear(y,m),d];this._validateLevel--;return j}catch(e){this._validateLevel--;throw e;}},_correctAdd:function(a,b,c,d){if(!this.hasYearZero&&(d=='y'||d=='m')){if(b[0]==0||(a.year()>0)!=(b[0]>0)){var e={y:[1,1,'y'],m:[1,this.monthsInYear(-1),'m'],w:[this.daysInWeek(),this.daysInYear(-1),'d'],d:[1,this.daysInYear(-1),'d']}[d];var f=(c<0?-1:+1);b=this._add(a,c*e[0]+f*e[1],e[2])}}return a.date(b[0],b[1],b[2])},set:function(a,b,c){this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);var y=(c=='y'?b:a.year());var m=(c=='m'?b:a.month());var d=(c=='d'?b:a.day());if(c=='y'||c=='m'){d=Math.min(d,this.daysInMonth(y,m))}return a.date(y,m,d)},isValid:function(a,b,c){this._validateLevel++;var d=(this.hasYearZero||a!=0);if(d){var e=this.newDate(a,b,this.minDay);d=(b>=this.minMonth&&b-this.minMonth<this.monthsInYear(e))&&(c>=this.minDay&&c-this.minDay<this.daysInMonth(e))}this._validateLevel--;return d},toJSDate:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);return $.calendars.instance().fromJD(this.toJD(d)).toJSDate()},fromJSDate:function(a){return this.fromJD($.calendars.instance().fromJSDate(a).toJD())},_validate:function(a,b,c,d){if(a.year){if(this._validateLevel==0&&this.name!=a.calendar().name){throw($.calendars.local.differentCalendars||$.calendars.regional[''].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,a.calendar().local.name)}return a}try{this._validateLevel++;if(this._validateLevel==1&&!this.isValid(a,b,c)){throw d.replace(/\{0\}/,this.local.name)}var f=this.newDate(a,b,c);this._validateLevel--;return f}catch(e){this._validateLevel--;throw e;}}});function GregorianCalendar(a){this.local=this.regional[a]||this.regional['']}GregorianCalendar.prototype=new BaseCalendar;$.extend(GregorianCalendar.prototype,{name:'Gregorian',jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:false,minMonth:1,firstMonth:1,minDay:1,regional:{'':{name:'Gregorian',epochs:['BCE','CE'],monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dateFormat:'mm/dd/yyyy',firstDay:0,isRTL:false}},leapYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear||$.calendars.regional[''].invalidYear);var a=b.year()+(b.year()<0?1:0);return a%4==0&&(a%100!=0||a%400==0)},weekOfYear:function(a,b,c){var d=this.newDate(a,b,c);d.add(4-(d.dayOfWeek()||7),'d');return Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(a,b){var c=this._validate(a,b,this.minDay,$.calendars.local.invalidMonth||$.calendars.regional[''].invalidMonth);return this.daysPerMonth[c.month()-1]+(c.month()==2&&this.leapYear(c.year())?1:0)},weekDay:function(a,b,c){return(this.dayOfWeek(a,b,c)||7)<6},toJD:function(c,d,e){var f=this._validate(c,d,e,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);c=f.year();d=f.month();e=f.day();if(c<0){c++}if(d<3){d+=12;c--}var a=Math.floor(c/100);var b=2-a+Math.floor(a/4);return Math.floor(365.25*(c+4716))+Math.floor(30.6001*(d+1))+e+b-1524.5},fromJD:function(f){var z=Math.floor(f+0.5);var a=Math.floor((z-1867216.25)/36524.25);a=z+1+a-Math.floor(a/4);var b=a+1524;var c=Math.floor((b-122.1)/365.25);var d=Math.floor(365.25*c);var e=Math.floor((b-d)/30.6001);var g=b-d-Math.floor(e*30.6001);var h=e-(e>13.5?13:1);var i=c-(h>2.5?4716:4715);if(i<=0){i--}return this.newDate(i,h,g)},toJSDate:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate||$.calendars.regional[''].invalidDate);var e=new Date(d.year(),d.month()-1,d.day());e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);e.setHours(e.getHours()>12?e.getHours()+2:0);return e},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});$.calendars=new Calendars();$.calendars.cdate=CDate;$.calendars.baseCalendar=BaseCalendar;$.calendars.calendars.gregorian=GregorianCalendar})(jQuery);
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.nepali.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.nepali.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.nepali.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Nepali calendar for jQuery v1.2.1
+   Written by Artur Neumann (ict.projects{at}nepal.inf.org) April 2013.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){function NepaliCalendar(a){this.local=this.regional[a||'']||this.regional['']}NepaliCalendar.prototype=new $.calendars.baseCalendar;$.extend(NepaliCalendar.prototype,{name:'Nepali',jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:false,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regional:{'':{name:'Nepali',epochs:['BBS','ABS'],monthNames:['Baisakh','Jestha','Ashadh','Shrawan','Bhadra','Ashwin','Kartik','Mangsir','Paush','Mangh','Falgun','Chaitra'],monthNamesShort:['Bai','Je','As','Shra','Bha','Ash','Kar','Mang','Pau','Ma','Fal','Chai'],dayNames:['Aaitabaar','Sombaar','Manglbaar','Budhabaar','Bihibaar','Shukrabaar','Shanibaar'],dayNamesShort:['Aaita','Som','Mangl','Budha','Bihi','Shukra','Shani'],dayNamesMin:['Aai','So','Man','Bu','Bi','Shu','Sha'],dateFormat:'dd/mm/yyyy',firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:''}},leapYear:function(a){return this.daysInYear(a)!=this.daysPerYear},weekOfYear:function(a,b,c){var d=this.newDate(a,b,c);d.add(-d.dayOfWeek(),'d');return Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(a){var b=this._validate(a,this.minMonth,this.minDay,$.calendars.local.invalidYear);a=b.year();if(typeof this.NEPALI_CALENDAR_DATA[a]=='undefined'){return this.daysPerYear}var c=0;for(var d=this.minMonth;d<=12;d++){c+=this.NEPALI_CALENDAR_DATA[a][d]}return c},daysInMonth:function(a,b){if(a.year){b=a.month();a=a.year()}this._validate(a,b,this.minDay,$.calendars.local.invalidMonth);return(typeof this.NEPALI_CALENDAR_DATA[a]=='undefined'?this.daysPerMonth[b-1]:this.NEPALI_CALENDAR_DATA[a][b])},weekDay:function(a,b,c){return this.dayOfWeek(a,b,c)!=6},toJD:function(a,b,c){var d=this._validate(a,b,c,$.calendars.local.invalidDate);a=d.year();b=d.month();c=d.day();var e=$.calendars.instance();var f=0;var g=b;var h=a;this._createMissingCalendarData(a);var i=a-(g>9||(g==9&&c>=this.NEPALI_CALENDAR_DATA[h][0])?56:57);if(b!=9){f=c;g--}while(g!=9){if(g<=0){g=12;h--}f+=this.NEPALI_CALENDAR_DATA[h][g];g--}if(b==9){f+=c-this.NEPALI_CALENDAR_DATA[h][0];if(f<=0){f+=(e.leapYear(i)?366:365)}}else{f+=this.NEPALI_CALENDAR_DATA[h][9]-this.NEPALI_CALENDAR_DATA[h][0]}return e.newDate(i,1,1).add(f,'d').toJD()},fromJD:function(a){var b=$.calendars.instance();var c=b.fromJD(a);var d=c.year();var e=c.dayOfYear();var f=d+56;this._createMissingCalendarData(f);var g=9;var h=this.NEPALI_CALENDAR_DATA[f][0];var i=this.NEPALI_CALENDAR_DATA[f][g]-h+1;while(e>i){g++;if(g>12){g=1;f++}i+=this.NEPALI_CALENDAR_DATA[f][g]}var j=this.NEPALI_CALENDAR_DATA[f][g]-(i-e);return this.newDate(f,g,j)},_createMissingCalendarData:function(a){var b=this.daysPerMonth.slice(0);b.unshift(17);for(var c=(a-1);c<(a+2);c++){if(typeof this.NEPALI_CALENDAR_DATA[c]=='undefined'){this.NEPALI_CALENDAR_DATA[c]=b}}},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2000:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}});$.calendars.calendars.nepali=NepaliCalendar})(jQuery);
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.plus.min.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.plus.min.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/calendar/jquery.calendars.plus.min.js	2014-04-27 14:02:21 +0000
@@ -0,0 +1,6 @@
+/* http://keith-wood.name/calendars.html
+   Calendars extras for jQuery v1.2.1.
+   Written by Keith Wood (kbwood{at}iinet.com.au) August 2009.
+   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
+   Please attribute the author if you use it. */
+(function($){$.extend($.calendars.regional[''],{invalidArguments:'Invalid arguments',invalidFormat:'Cannot format a date from another calendar',missingNumberAt:'Missing number at position {0}',unknownNameAt:'Unknown name at position {0}',unexpectedLiteralAt:'Unexpected literal at position {0}',unexpectedText:'Additional text found at end'});$.calendars.local=$.calendars.regional[''];$.extend($.calendars.cdate.prototype,{formatDate:function(a){return this._calendar.formatDate(a||'',this)}});$.extend($.calendars.baseCalendar.prototype,{UNIX_EPOCH:$.calendars.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:$.calendars.instance().jdEpoch,TICKS_PER_DAY:24*60*60*10000000,ATOM:'yyyy-mm-dd',COOKIE:'D, dd M yyyy',FULL:'DD, MM d, yyyy',ISO_8601:'yyyy-mm-dd',JULIAN:'J',RFC_822:'D, d M yy',RFC_850:'DD, dd-M-yy',RFC_1036:'D, d M yy',RFC_1123:'D, d M yyyy',RFC_2822:'D, d M yyyy',RSS:'D, d M yy',TICKS:'!',TIMESTAMP:'@',W3C:'yyyy-mm-dd',formatDate:function(f,g,h){if(typeof f!='string'){h=g;g=f;f=''}if(!g){return''}if(g.calendar()!=this){throw $.calendars.local.invalidFormat||$.calendars.regional[''].invalidFormat;}f=f||this.local.dateFormat;h=h||{};var i=h.dayNamesShort||this.local.dayNamesShort;var j=h.dayNames||this.local.dayNames;var k=h.monthNamesShort||this.local.monthNamesShort;var l=h.monthNames||this.local.monthNames;var m=h.calculateWeek||this.local.calculateWeek;var n=function(a,b){var c=1;while(s+c<f.length&&f.charAt(s+c)==a){c++}s+=c-1;return Math.floor(c/(b||1))>1};var o=function(a,b,c,d){var e=''+b;if(n(a,d)){while(e.length<c){e='0'+e}}return e};var p=function(a,b,c,d){return(n(a)?d[b]:c[b])};var q='';var r=false;for(var s=0;s<f.length;s++){if(r){if(f.charAt(s)=="'"&&!n("'")){r=false}else{q+=f.charAt(s)}}else{switch(f.charAt(s)){case'd':q+=o('d',g.day(),2);break;case'D':q+=p('D',g.dayOfWeek(),i,j);break;case'o':q+=o('o',g.dayOfYear(),3);break;case'w':q+=o('w',g.weekOfYear(),2);break;case'm':q+=o('m',g.month(),2);break;case'M':q+=p('M',g.month()-this.minMonth,k,l);break;case'y':q+=(n('y',2)?g.year():(g.year()%100<10?'0':'')+g.year()%100);break;case'Y':n('Y',2);q+=g.formatYear();break;case'J':q+=g.toJD();break;case'@':q+=(g.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case'!':q+=(g.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":if(n("'")){q+="'"}else{r=true}break;default:q+=f.charAt(s)}}}return q},parseDate:function(g,h,j){if(h==null){throw $.calendars.local.invalidArguments||$.calendars.regional[''].invalidArguments;}h=(typeof h=='object'?h.toString():h+'');if(h==''){return null}g=g||this.local.dateFormat;j=j||{};var k=j.shortYearCutoff||this.shortYearCutoff;k=(typeof k!='string'?k:this.today().year()%100+parseInt(k,10));var l=j.dayNamesShort||this.local.dayNamesShort;var m=j.dayNames||this.local.dayNames;var n=j.monthNamesShort||this.local.monthNamesShort;var o=j.monthNames||this.local.monthNames;var p=-1;var q=-1;var r=-1;var s=-1;var t=-1;var u=false;var v=false;var w=function(a,b){var c=1;while(C+c<g.length&&g.charAt(C+c)==a){c++}C+=c-1;return Math.floor(c/(b||1))>1};var x=function(a,b){var c=w(a,b);var d=[2,3,c?4:2,c?4:2,10,11,20]['oyYJ@!'.indexOf(a)+1];var e=new RegExp('^-?\\d{1,'+d+'}');var f=h.substring(B).match(e);if(!f){throw($.calendars.local.missingNumberAt||$.calendars.regional[''].missingNumberAt).replace(/\{0\}/,B)}B+=f[0].length;return parseInt(f[0],10)};var y=this;var z=function(a,b,c,d){var e=(w(a,d)?c:b);for(var i=0;i<e.length;i++){if(h.substr(B,e[i].length).toLowerCase()==e[i].toLowerCase()){B+=e[i].length;return i+y.minMonth}}throw($.calendars.local.unknownNameAt||$.calendars.regional[''].unknownNameAt).replace(/\{0\}/,B)};var A=function(){if(h.charAt(B)!=g.charAt(C)){throw($.calendars.local.unexpectedLiteralAt||$.calendars.regional[''].unexpectedLiteralAt).replace(/\{0\}/,B)}B++};var B=0;for(var C=0;C<g.length;C++){if(v){if(g.charAt(C)=="'"&&!w("'")){v=false}else{A()}}else{switch(g.charAt(C)){case'd':s=x('d');break;case'D':z('D',l,m);break;case'o':t=x('o');break;case'w':x('w');break;case'm':r=x('m');break;case'M':r=z('M',n,o);break;case'y':var D=C;u=!w('y',2);C=D;q=x('y',2);break;case'Y':q=x('Y',2);break;case'J':p=x('J')+0.5;if(h.charAt(B)=='.'){B++;x('J')}break;case'@':p=x('@')/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case'!':p=x('!')/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case'*':B=h.length;break;case"'":if(w("'")){A()}else{v=true}break;default:A()}}}if(B<h.length){throw $.calendars.local.unexpectedText||$.calendars.regional[''].unexpectedText;}if(q==-1){q=this.today().year()}else if(q<100&&u){q+=(k==-1?1900:this.today().year()-this.today().year()%100-(q<=k?0:100))}if(t>-1){r=1;s=t;for(var E=this.daysInMonth(q,r);s>E;E=this.daysInMonth(q,r)){r++;s-=E}}return(p>-1?this.fromJD(p):this.newDate(q,r,s))},determineDate:function(f,g,h,i,j){if(h&&typeof h!='object'){j=i;i=h;h=null}if(typeof i!='string'){j=i;i=''}var k=this;var l=function(a){try{return k.parseDate(i,a,j)}catch(e){}a=a.toLowerCase();var b=(a.match(/^c/)&&h?h.newDate():null)||k.today();var c=/([+-]?[0-9]+)\s*(d|w|m|y)?/g;var d=c.exec(a);while(d){b.add(parseInt(d[1],10),d[2]||'d');d=c.exec(a)}return b};g=(g?g.newDate():null);f=(f==null?g:(typeof f=='string'?l(f):(typeof f=='number'?(isNaN(f)||f==Infinity||f==-Infinity?g:k.today().add(f,'d')):k.newDate(f))));return f}})})(jQuery);
\ No newline at end of file