Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
fangdeng
PPT, PDF
557 views
Let's talk about date in javascript
AI-enhanced description
本文介绍了 JavaScript 中的 Date 对象及其常用方法。包括创建 Date 对象的不同方式、时间标准的解释,以及如何获取和设置日期的各个部分。还提到了一些实用的日期格式化工具和框架。
Education
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Download to read offline
1
/ 9
2
/ 9
3
/ 9
4
/ 9
5
/ 9
6
/ 9
7
/ 9
8
/ 9
9
/ 9
More Related Content
PPT
Terragen地形設計(二):天空與大氣效果
by
智傑 楊
PPT
Terragen地形設計(一):地形與水面
by
智傑 楊
PDF
探奇教學文章 - mblock 5 的天氣資料
by
信仁 邱
PPT
台灣關鍵數據網18th- 氣候議題-20150802
by
長鋼 吳
PPTX
Herramientas digitales para la educación
by
Xochitl Suárez
PDF
Ea31847853
by
IJERA Editor
PPTX
Análisis Campaña Publicitaria
by
Guillermo Ayala
PPT
Pres. Ar 09
by
aromro13
Terragen地形設計(二):天空與大氣效果
by
智傑 楊
Terragen地形設計(一):地形與水面
by
智傑 楊
探奇教學文章 - mblock 5 的天氣資料
by
信仁 邱
台灣關鍵數據網18th- 氣候議題-20150802
by
長鋼 吳
Herramientas digitales para la educación
by
Xochitl Suárez
Ea31847853
by
IJERA Editor
Análisis Campaña Publicitaria
by
Guillermo Ayala
Pres. Ar 09
by
aromro13
Viewers also liked
PDF
Committee On Investor Awareness & Protection(Report 2009)
by
The Financial Literates
PDF
Web Services Training in Noida
by
Tech Mentro
PPTX
On the Ground, Health Policy in Action (Noelle Sisk, Beth Kessler)
by
National Association of Councils on Developmental Disabilities
PDF
Hoy comemos con
by
Iñaki González Rodríguez
PDF
Rmg Client Funding Request Process Nov 2012
by
Robert McAngus
PPTX
Is Bebuzee the next social media network we have been waiting for?
by
Olawale Daniel
PPS
Beautiful India
by
guestfb9c74
ODP
When dynamic becomes static : the next step in web caching techniques
by
Wim Godden
PPT
Where Does DTC Go From Here?
by
Laurie Gelb
DOC
План работы совета профилактики
by
Средняя школа №2 г. Пошехонье
PPT
Multiples Fuentes de Ingreso
by
chamayra
DOCX
7 manajemen produksi
by
Syafar Ajha
PPT
Purple cow 2011 (dental)
by
thepurplecowph
PDF
Casting a Light on Shadow IT
by
Virtualization and Cloud Management Solutions
Committee On Investor Awareness & Protection(Report 2009)
by
The Financial Literates
Web Services Training in Noida
by
Tech Mentro
On the Ground, Health Policy in Action (Noelle Sisk, Beth Kessler)
by
National Association of Councils on Developmental Disabilities
Hoy comemos con
by
Iñaki González Rodríguez
Rmg Client Funding Request Process Nov 2012
by
Robert McAngus
Is Bebuzee the next social media network we have been waiting for?
by
Olawale Daniel
Beautiful India
by
guestfb9c74
When dynamic becomes static : the next step in web caching techniques
by
Wim Godden
Where Does DTC Go From Here?
by
Laurie Gelb
План работы совета профилактики
by
Средняя школа №2 г. Пошехонье
Multiples Fuentes de Ingreso
by
chamayra
7 manajemen produksi
by
Syafar Ajha
Purple cow 2011 (dental)
by
thepurplecowph
Casting a Light on Shadow IT
by
Virtualization and Cloud Management Solutions
More from fangdeng
PDF
jQuery底层架构
by
fangdeng
PDF
Building an event driven web
by
fangdeng
PPTX
浅尝jQuery
by
fangdeng
PPTX
Html基础培训
by
fangdeng
PPT
前端开发之Js
by
fangdeng
PPTX
Javascript代码注释及文档生成
by
fangdeng
PPTX
J engine -构建高性能、可监控的前端应用框架
by
fangdeng
PPT
前端单元测试初体验
by
fangdeng
PPTX
Java script测试之js unit ut
by
fangdeng
PDF
2011年方凳年度总结及颁奖
by
fangdeng
PDF
产品线中的思考
by
fangdeng
PPTX
产品线中的思考
by
fangdeng
PPTX
Postoffer前端架构设计
by
fangdeng
PPTX
Varnish简介
by
fangdeng
PDF
Websocket
by
fangdeng
PDF
Test driven-frontend-develop
by
fangdeng
PDF
方凳良品1期
by
fangdeng
PDF
方凳良品2期
by
fangdeng
PPT
魏琪君-重构-关于可读性、原则和模式
by
fangdeng
PPTX
Datalazyload
by
fangdeng
jQuery底层架构
by
fangdeng
Building an event driven web
by
fangdeng
浅尝jQuery
by
fangdeng
Html基础培训
by
fangdeng
前端开发之Js
by
fangdeng
Javascript代码注释及文档生成
by
fangdeng
J engine -构建高性能、可监控的前端应用框架
by
fangdeng
前端单元测试初体验
by
fangdeng
Java script测试之js unit ut
by
fangdeng
2011年方凳年度总结及颁奖
by
fangdeng
产品线中的思考
by
fangdeng
产品线中的思考
by
fangdeng
Postoffer前端架构设计
by
fangdeng
Varnish简介
by
fangdeng
Websocket
by
fangdeng
Test driven-frontend-develop
by
fangdeng
方凳良品1期
by
fangdeng
方凳良品2期
by
fangdeng
魏琪君-重构-关于可读性、原则和模式
by
fangdeng
Datalazyload
by
fangdeng
Let's talk about date in javascript
1.
Let’s talk about
“ Date ” in Javascript 2010.10.12
2.
Date() new Date()
new Date(2011) new Date(2011, 12) new Date(2011, 0, 0) new Date(2011, 1, 29) new Date(1969, 12, -1) new Date(0, 0, 0) new Date(-1, -1, -1) 当前时区的当前时间 1970-01-01 08:00:02 011 2012-01-01 00:00:00 000 2010-12-31 00:00:00 000 2011-03-01 00:00:00 000 1969-12-30 00:00:00 000 1899-12-31 00:00:00 000 -0002-11-29 00:00:00 000
3.
时间标准 UTC 协调世界时
跟理论上的 GMT 时间一致 跟原子钟时间基本一致,误差不超过 1s ,适用于相对精确的时间计算。更精确的就是原子时了。 逐渐替代 GMT GMT 格林尼治标准时 当太阳穿过格林尼治子午线的时候为正午 随着地球自转的缓慢趋势,需要不断调整。精确度比较低,适用于“掐指一算”。 逐渐淘汰
4.
北京时间 UTC +
8 ( Date 中根据 GMT 参照) 中国地区都按北京时间为准( UTC 基础上加 8 小时) 好处:在中国到处游玩不用准备多块手表或随时随地计算当地时间 Date 对象的“ getXXX()” 函数都是以操作系统的时区进行转换。“ getUTCXXX()” 根据 UTC 时间
5.
Date 对象常用方法 getTime(),
setTime() 获取 / 设置 1970-01-01 00:00:00 000 至 Date 对象时间的毫秒数(早于 1970-01-01 00:00:00 000 的时间为负数)。 getFullYear(), setFullYear() 获取 / 设置以四位数字的格式返回对象的年份。 getMonth(), setMonth() 获取 / 设置日期对象的月份,从 0~11 依次对应一月份 ~ 十二月份。
6.
Date 对象常用方法 getDate(),
setDate() 获取 / 设置 Date 对象当前月份的“日” (1~31) 。 getDay() 获取 Date 对象日期的星期,从 0~6 依次对应周日 ~ 周六。
7.
Date 的运算
8.
Date 的格式化 目前浏览器没有提供实用的日期格式转化方法。
Fdev4 框架提供了 “ util-date ” 组件,提供了常用的日期控制方法,包括字符串和日期对象互转的方法。 dateInstance.format( format ) jQuery.util.date.parse ( s[, format] )
9.
Thanks!
Editor's Notes
#3
FF 下 new Date(2011) 得到的时间和 IE Chrome 不一致。
Download