亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

JavaScript getUTCFullYear() 方法

定義和用法

getUTCFullYear() 方法可返回根據(jù)世界時(shí) (UTC) 表示的年份的四位數(shù)字。

語(yǔ)法

dateObject.getUTCFullYear()

返回值

返回 dateObject 用世界時(shí)表示時(shí)的年份,該值是一個(gè)四位的整數(shù),而不是兩位數(shù)的縮寫(xiě)。

提示和注釋?zhuān)?/h2>

注釋?zhuān)?/span>該方法總是結(jié)合一個(gè) Date 對(duì)象來(lái)使用。

提示:有關(guān)通用協(xié)調(diào)時(shí)間 (UTC) 的更多資料,請(qǐng)參閱百度百科。

實(shí)例

例子 1

In this example we get the current year and print it:

<script type="text/javascript">

var d = new Date()
document.write(d.getUTCFullYear())

</script>

輸出:



例子 2

Here we will extract the year out of the specific date:

<script type="text/javascript">

var born = new Date("July 21, 1983 01:15:00")
document.write("I was born in " + born.getUTCFullYear())

</script>

輸出:

I was born in 1983

TIY

以不同的格式顯示 UTC 日期
如何使用 getUTCDate(), getUTCMonth() 以及 getUTCFullYear() 來(lái)使用不同的格式顯示 UTC 日期。