Skip to content

Commit 7a257bc

Browse files
authored
Merge pull request #1364 from carolinacmoravia/patch-10
CC46963: fix getUTCHours method's typing error and logs #1 [AUTOMATED]
2 parents e664aab + 6764802 commit 7a257bc

File tree

1 file changed

+70
-70
lines changed

1 file changed

+70
-70
lines changed
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
---
2-
title: "getUTCHours Method (Date) (JavaScript) | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "01/18/2017"
5-
ms.prod: "windows-client-threshold"
6-
ms.reviewer: ""
7-
ms.suite: ""
8-
ms.technology:
9-
- "devlang-javascript"
10-
ms.tgt_pltfrm: ""
11-
ms.topic: "language-reference"
12-
f1_keywords:
13-
- "getUTCHours"
14-
dev_langs:
15-
- "JavaScript"
1+
---
2+
title: "getUTCHours Method (Date) (JavaScript) | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "01/18/2017"
5+
ms.prod: "windows-client-threshold"
6+
ms.reviewer: ""
7+
ms.suite: ""
8+
ms.technology:
9+
- "devlang-javascript"
10+
ms.tgt_pltfrm: ""
11+
ms.topic: "language-reference"
12+
f1_keywords:
13+
- "getUTCHours"
14+
dev_langs:
15+
- "JavaScript"
1616
- "TypeScript"
17-
- "DHTML"
18-
helpviewer_keywords:
19-
- "hours"
20-
- "UTC times, returning"
21-
- "getUTCHours method"
22-
ms.assetid: 7c9825dd-4b3a-4614-8e09-f40df123b630
23-
caps.latest.revision: 11
24-
author: "mikejo5000"
25-
ms.author: "mikejo"
26-
manager: "ghogen"
27-
---
28-
# getUTCHours Method (Date) (JavaScript)
29-
Gets the hours value in a `Date` object using Universal Coordinated Time (UTC).
30-
31-
## Syntax
32-
33-
```
34-
35-
dateObj.getUTCHours()
36-
```
37-
38-
#### Parameters
39-
The required `dateObj` reference is a `Date` object.
40-
41-
## Return Value
42-
Returns an integer between 0 and 23 indicating the number of hours since midnight. Zero is returned if the time is before 1:00:00 am. If a `Date` object was created without specifying the time, by default the hour is 0 in UTC time. This time may be non-zero in other time zones.
43-
44-
## Remarks
45-
To get the number of hours elapsed since midnight using local time, use the `getHours` method.
46-
47-
## Example
48-
The following example illustrates the use of the `getUTCHours` method.
49-
50-
```JavaScript
51-
var date = new Date("1/1/2001");
52-
document.write(date.getUTCHours());
53-
document.write("<br/>");
54-
55-
var date2 = new Date("1/1/2001 11:22:33");
56-
document.write(datee.getUTCHours());
57-
58-
// Output (in the PST time zone):
59-
// 8
60-
// 19
61-
```
62-
63-
## Requirements
64-
[!INCLUDE[jsv3](../../javascript/reference/includes/jsv3-md.md)]
65-
66-
**Applies To**: [Date Object](../../javascript/reference/date-object-javascript.md)
67-
68-
## See Also
69-
[getHours Method (Date)](../../javascript/reference/gethours-method-date-javascript.md)
70-
[setHours Method (Date)](../../javascript/reference/sethours-method-date-javascript.md)
71-
[setUTCHours Method (Date)](../../javascript/reference/setutchours-method-date-javascript.md)
17+
- "DHTML"
18+
helpviewer_keywords:
19+
- "hours"
20+
- "UTC times, returning"
21+
- "getUTCHours method"
22+
ms.assetid: 7c9825dd-4b3a-4614-8e09-f40df123b630
23+
caps.latest.revision: 11
24+
author: "mikejo5000"
25+
ms.author: "mikejo"
26+
manager: "ghogen"
27+
---
28+
# getUTCHours Method (Date) (JavaScript)
29+
Gets the hours value in a `Date` object using Universal Coordinated Time (UTC).
30+
31+
## Syntax
32+
33+
```
34+
35+
dateObj.getUTCHours()
36+
```
37+
38+
#### Parameters
39+
The required `dateObj` reference is a `Date` object.
40+
41+
## Return Value
42+
Returns an integer between 0 and 23 indicating the number of hours since midnight. Zero is returned if the time is before 1:00:00 am. If a `Date` object was created without specifying the time, by default the hour is 0 in UTC time. This time may be non-zero in other time zones.
43+
44+
## Remarks
45+
To get the number of hours elapsed since midnight using local time, use the `getHours` method.
46+
47+
## Example
48+
The following example illustrates the use of the `getUTCHours` method.
49+
50+
```JavaScript
51+
var date = new Date("1/1/2001");
52+
document.write(date.getUTCHours());
53+
document.write("<br/>");
54+
55+
var date2 = new Date("1/1/2001 11:22:33");
56+
document.write(date2.getUTCHours());
57+
58+
// Output (in the PST time zone):
59+
// 15
60+
// 2
61+
```
62+
63+
## Requirements
64+
[!INCLUDE[jsv3](../../javascript/reference/includes/jsv3-md.md)]
65+
66+
**Applies To**: [Date Object](../../javascript/reference/date-object-javascript.md)
67+
68+
## See Also
69+
[getHours Method (Date)](../../javascript/reference/gethours-method-date-javascript.md)
70+
[setHours Method (Date)](../../javascript/reference/sethours-method-date-javascript.md)
71+
[setUTCHours Method (Date)](../../javascript/reference/setutchours-method-date-javascript.md)

0 commit comments

Comments
 (0)