반응형

http://stackoverflow.com/questions/11887934/check-if-daylight-saving-time-is-in-effect-and-if-it-is-for-how-many-hours

 

How to check if the DST (Daylight Saving Time) is in effect and if it is what's the offset?

This is a bit of my JS code for which this is needed: var secDiff = Math.abs(Math.round((utc_date-this.premiere_date)/1000)); this.years = this.calculateUnit(secDiff,(86400*365)); this.days = this.

stackoverflow.com

ex)

 

javascript :

 

  jQuery("[data-utc-date]").each(function(){
   var utc_date_string = jQuery(this).data("utc-date");
   var localdate = new Date(utc_date_string);
//console.log(utc_date_string);
//console.log(">> "+ localdate.toString());
//console.log(">> "+ date("Y-m-d", localdate.getTime()/1000));
jQuery(this).text(date("Y-m-d", localdate.getTime()/1000));
});

  jQuery("[data-utc-date-time]").each(function(){
   var utc_date_string = jQuery(this).data("utc-date-time");
   var localdate = new Date(utc_date_string);
//console.log(utc_date_string);
//console.log(">> "+ localdate.toString());
//console.log(">> "+ date("Y-m-d", localdate.getTime()/1000));
jQuery(this).text(date("Y-m-d H:i:s", localdate.getTime()/1000));

});

 

+

http://phpjs.org/functions/date/

불러오는 중입니다...

 

반응형

'WEB > HTML&SCRIPTS' 카테고리의 다른 글

jQuery UploadFile plugin  (0) 2019.07.15
js MarkDown helper library  (0) 2019.07.15
JQuery - 스마트폰 감지  (0) 2019.07.15
jQuery.ajax xdom cors 응답 문제 시  (0) 2019.07.15
CSS 핵 정리 (IE6, IE7, IE8, IE9), FF, Chrome, Safari  (0) 2011.10.03

+ Recent posts