b0y-101 Mini Shell


Current Path : E:/www/km/14/media/system/js/fields/calendar-locales/date/gregorian/
File Upload :
Current File : E:/www/km/14/media/system/js/fields/calendar-locales/date/gregorian/date-helper.min.js

!function(a){"use strict";a.SECOND=1e3,a.MINUTE=60*a.SECOND,a.HOUR=60*a.MINUTE,a.DAY=24*a.HOUR,a.WEEK=7*a.DAY,a.prototype.setLocalDateOnly=function(b,c){if("gregorian"!=b)return"";var d=new a(c);this.setDate(1),this.setFullYear(d.getFullYear()),this.setMonth(d.getMonth()),this.setDate(d.getDate())},a.prototype.setLocalDate=function(a,b){return"gregorian"!=a?"":this.setDate(b)},a.prototype.setLocalMonth=function(a,b,c){return"gregorian"!=a?"":(void 0==c&&this.getDate(),this.setMonth(b))},a.prototype.setOtherFullYear=function(b,c){if("gregorian"!=b)return"";var d=new a(this);return d.setFullYear(c),d.getMonth()!=this.getMonth()&&this.setDate(28),this.setUTCFullYear(c)},a.prototype.setLocalFullYear=function(b,c){if("gregorian"!=b)return"";var d=new a(this);return d.setFullYear(c),d.getMonth()!=this.getMonth()&&this.setDate(28),this.setFullYear(c)},a.prototype.getLocalWeekDays=function(a,b){return 6},a.prototype.getOtherFullYear=function(a){return"gregorian"!=a?"":this.getFullYear()},a.prototype.getLocalFullYear=function(a){return"gregorian"!=a?"":this.getFullYear()},a.prototype.getLocalMonth=function(a){return"gregorian"!=a?"":this.getMonth()},a.prototype.getLocalDate=function(a){return"gregorian"!=a?"":this.getDate()},a.prototype.getLocalDay=function(a){return"gregorian"!=a?"":this.getDay()},a.prototype.getLocalMonthDays=function(a,b){if("gregorian"!=a)return"";var c=this.getFullYear();return"undefined"==typeof b&&(b=this.getMonth()),0!=c%4||0==c%100&&0!=c%400||1!=b?[31,28,31,30,31,30,31,31,30,31,30,31][b]:29},a.prototype.getLocalWeekNumber=function(b){if("gregorian"!=b)return"";var c=new a(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),d=c.getDay();c.setDate(c.getDate()-(d+6)%7+3);var e=c.valueOf();return c.setMonth(0),c.setDate(4),Math.round((e-c.valueOf())/6048e5)+1},a.prototype.getLocalDayOfYear=function(b){if("gregorian"!=b)return"";var c=new a(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),d=new a(this.getFullYear(),0,0,0,0,0),e=c-d;return Math.floor(e/a.DAY)},a.prototype.equalsTo=function(a){return this.getFullYear()==a.getFullYear()&&this.getMonth()==a.getMonth()&&this.getDate()==a.getDate()&&this.getHours()==a.getHours()&&this.getMinutes()==a.getMinutes()},a.localCalToGregorian=function(a,b,c){return""},a.gregorianToLocalCal=function(a,b,c){return""},a.parseFieldDate=function(b,c,d){"gregorian"!=d&&(b=a.toEnglish(b));var e=new a,f=0,g=-1,h=0,i=b.split(/\W+/),j=c.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k<i.length;++k)if(i[k])switch(j[k]){case"%d":case"%e":h=parseInt(i[k],10);break;case"%m":g=parseInt(i[k],10)-1;break;case"%Y":case"%y":f=parseInt(i[k],10),f<100&&(f+=f>29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(JoomlaCalLocale.months[l].substr(0,i[k].length).toLowerCase()==i[k].toLowerCase()){g=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(i[k],10);break;case"%P":case"%p":/pm/i.test(i[k])&&m<12?m+=12:/am/i.test(i[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(i[k],10)}if(isNaN(f)&&(f=e.getFullYear()),isNaN(g)&&(g=e.getMonth()),isNaN(h)&&(h=e.getDate()),isNaN(m)&&(m=e.getHours()),isNaN(n)&&(n=e.getMinutes()),isNaN(o)&&(o=e.getSeconds()),0!=f&&g!=-1&&0!=h)return new a(f,g,h,m,n,o);for(f=0,g=-1,h=0,k=0;k<i.length;++k)if(i[k].search(/[a-zA-Z]+/)!=-1){var p=-1;for(l=0;l<12;++l)if(JoomlaCalLocale.months[l].substr(0,i[k].length).toLowerCase()==i[k].toLowerCase()){p=l;break}p!=-1&&(g!=-1&&(h=g+1),g=p)}else parseInt(i[k],10)<=12&&g==-1?g=i[k]-1:parseInt(i[k],10)>31&&0==f?(f=parseInt(i[k],10),f<100&&(f+=f>29?1900:2e3)):0==h&&(h=i[k]);return 0==f&&(f=e.getFullYear()),g!=-1&&0!=h?new a(f,g,h,m,n,o):e},a.prototype.print=function(b,c,d){if("string"!=typeof c&&(b=""),c||(c="gregorian"),"string"!=typeof b&&(b=""),!b)return"";if("NaN"==this.getLocalDate(c)||!this.getLocalDate(c))return"";var e=this.getLocalMonth(c),f=this.getLocalDate(c),g=this.getLocalFullYear(c),h=this.getLocalWeekNumber(c),i=this.getDay(),j={},k=this.getHours(),l=k>=12,m=l?k-12:k,n=this.getLocalDayOfYear(c);0==m&&(m=12);var o=this.getMinutes(),p=this.getSeconds();j["%a"]=JoomlaCalLocale.shortDays[i],j["%A"]=JoomlaCalLocale.days[i],j["%b"]=JoomlaCalLocale.shortMonths[e],j["%B"]=JoomlaCalLocale.months[e],j["%C"]=1+Math.floor(g/100),j["%d"]=f<10?"0"+f:f,j["%e"]=f,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k,j["%l"]=m,j["%m"]=e<9?"0"+(1+e):1+e,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?JoomlaCalLocale.PM:JoomlaCalLocale.AM,j["%P"]=l?JoomlaCalLocale.pm:JoomlaCalLocale.am,j["%s"]=Math.floor(this.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=h<10?"0"+h:h,j["%u"]=i+1,j["%w"]=i,j["%y"]=(""+g).substr(2,2),j["%Y"]=g,j["%%"]="%";var q=/%./g,r=b.replace(q,function(a){return j[a]||a});return"[object Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers)&&"gregorian"!=c&&d&&(r=a.convertNumbers(r)),r}}(Date);

Copyright © 2019 by b0y-101