`
stephen830
  • 浏览: 2968119 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

JavaScript Date 对象参考手册 getUTCMinutes() 方法

阅读更多

JavaScript getUTCMinutes() 方法

定义和用法

getUTCMinutes() 方法可根据世界时 (UTC) 返回时间的分钟字段。

语法

dateObject.getUTCMinutes()

 

返回值

返回 dateObject 用世界时表示时的分钟字段,该值是一个 0 ~ 59 之间的整数。

提示和注释:

注释:由 getUTCMinutes() 返回的值是一个两位的数字。不过返回值不总是两位的,如果该值小于 10,则仅返回一位数字。

注释:该方法总是结合一个 Date 对象来使用。

 

提示:有关通用协调时间 (UTC) 的更多资料,请参阅这里

 

实例

例子 1

在本例中,我们将取得当前时间的 UTC 分钟:

<script type="text/javascript">

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

</script>

 

 

输出:

31

 

 

例子 2

在此处,我们将从具体的日期和时间中提取 UTC 分钟:

<script type="text/javascript">

var born = new Date("July 21, 1983 01:15:00")
document.write(born.getUTCMinutes())

</script>

 

 

输出:

15

 

 

分享到:
评论

相关推荐

    微软JavaScript手册

    getUTCMinutes 方法 使用全球标准时间(UTC)返回 Date 对象的分钟数。 getUTCMonth 方法 使用全球标准时间(UTC)返回 Date 对象的月份值。 getUTCSeconds 方法 使用全球标准时间 (UTC) 返回 Date 对象的秒数。...

    JavaScript中getUTCMinutes()方法的使用详解

    javascript Date.getUTCMinutes()方法按照通用时间在指定日期返回分钟。通过getUTCMinutes返回的值是0到59之间的一个整数。 语法 Date.getUTCMinutes() 下面是参数的详细信息: NA 返回值: 按照通用时间返回分钟,...

    javascript语言参考+教程 CHM

    getUTCMinutes 方法; getUTCMonth 方法; getUTCSeconds 方法; getVarDate 方法; getYear 方法; indexOf 方法; isFinite 方法; isNaN 方法; italics 方法; item 方法; join 方法; lastIndexOf 方法; ...

    javascript文档

    getUTCMinutes 方法 使用全球标准时间(UTC)返回 Date 对象的分钟数。 getUTCMonth 方法 使用全球标准时间(UTC)返回 Date 对象的月份值。 getUTCSeconds 方法 使用全球标准时间 (UTC) 返回 Date 对象的秒数。...

    JScript 语言参考

    getUTCMinutes 方法 使用全球标准时间(UTC)返回 Date 对象的分钟数。 getUTCMonth 方法 使用全球标准时间(UTC)返回 Date 对象的月份值。 getUTCSeconds 方法 使用全球标准时间 (UTC) 返回 Date 对象的秒数。...

    JavaScript权威指南

    JavaScript权威指南 犀牛书 Chapter 1. Introduction to JavaScript Section 1.1. JavaScript Myths Section 1.2. Versions of JavaScript Section 1.3. Client-Side JavaScript Section 1.4. JavaScript ...

    Prototype Date对象 学习

    看一下源码: 代码如下: Date.prototype.toJSON = function() { return ‘”‘ + this.getUTCFullYear() + ‘-‘ + (this.getUTCMonth() + 1).toPaddedString(2) + ‘-‘ + this.getUTCDate().toPaddedString(2) + ...

    json.js_json2.js

    f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z'; }; You can provide an optional replacer method. It will be passed the key and value of each member, with this bound to the ...

    flash action script 经典字典教程大全,学flash必备

    getUTCMinutes Date.getUTCMinutes() getUTCMonth Date.getUTCMonth() getUTCSeconds Date.getUTCSeconds() getVersion getVersion getVolume Sound.getVolume() getYear Date.getYear() globalToLocal ...

Global site tag (gtag.js) - Google Analytics