tailieunhanh - Javascript bible_ Chapter 28

Tham khảo sách 'javascript bible_ chapter 28', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | The Date Object Note Perhaps the most untapped power of JavaScript is its date and time handling. Scripters passed over the Date object with good cause in the early days of JavaScript because in earlier versions of scriptable browsers significant bugs and platform-specific anomalies made date and time programming hazardous without significant testing. Even with the improved bug situation working with dates requires a working knowledge of the world s time zones and their relationships with the standard reference point Greenwich mean time GMT . Now that date- and time-handling has improved in the latest browsers I hope more scripters look into incorporating these kinds of calculations into their pages. In the bonus applications on the CD-ROM I show you an application that lets your Web site highlight the areas that have been updated since each visitor s last surf ride through your pages. Before getting to the JavaScript part of date discussions however I summarize key facts about time zones and their impact on scripting date and time on a browser. If you re not sure what GMT and UTC mean the following section is for you. Time Zones and GMT By international agreement the world is divided into distinct time zones that allow the inhabitants of each zone to say with confidence that when the Sun appears directly overhead it is roughly noon squarely in the middle of the day. The current time in the zone is what we set our clocks to the local time. That s fine when your entire existence and scope of life go no further than the width of your own time zone. But with instant communication among all parts of the world your scope reaches well beyond local time. Periodically you must be aware of the local time in other zones. After all if you live in New York you don t want to wake up someone in Los Angeles before dawn with a phone call from your office. From here on I speak of the Sun moving as if Earth were the center of the solar system. I do so for the convenience of our .

TỪ KHÓA LIÊN QUAN