JAVASCRIPT

 Home  Computers & Internet  Web Programming JAVASCRIPT
What is Javascript?
Javascript Placement
Syntax
Reserved Words
Variables
Data Types
Escaping Characters
Concatenation
Arithmetic Operators
Assignment Operators
Comparison Operators
Boolean Operators
Conditional Operator
If Statements
Else If Statements
If Else Statements
Switch Statements
While Loops
For Loops
Do While Loops
Break Statement
Continue Statement
prompt()
alert()
Date()
Event Handlers
String Object Methods
Math Object Methods
Window Object Methods
Arrays

JAVASCRIPT getUTCMinutes() METHOD

The getUTCMinutes() method in javascript returns the minutes of time in UTC (Universal Coordinated Time) as numbers from 0 to 59.

The general format is:

dateObject.getUTCMinutes();

If you want to return the minutes with getUTCMinutes() method, you will first have to create a new date object and then use the new date object with the getUTCMinutes() method.

Example 1: Using getUTCMinutes() for the minutes of the current time

<script type="text/javascript">

var mm=new Date(); // creates new date object

mm=mm.getUTCMinutes(); // returns the minutes

document.write(mm); // outputs the minutes

</script>

The above will output:



Example 2: Using getUTCMinutes() to get the minutes of a specified date/time:

<script type="text/javascript">

var mm=new Date("January 16, 2008 21:37:23");

mm=mm.getUTCMinutes();

document.write(mm);

</script>

The above will output:



See Also:

getDate() getDay() getMonth()
getFullYear() getYear() getHours()
getMinutes() getSeconds() getTime()
getTimezoneOffset() parse() setDate()
setFullYear() setHours() setMinutes()
setMonth() setSeconds() setTime()
setYear() toGMTString() toLocaleString()
toString() getUTCDate() getUTCDay()
getUTCMonth() getUTCFullYear() getUTCHours()
getUTCMinutes() getUTCSeconds() getUTCMilliseconds()
setUTCDate() setUTCDay() setUTCMonth()
setUTCFullYear() setUTCHour() setUTCMinutes()
setUTCSeconds() setUTCMilliseconds()  
Home | Privacy Policy | Terms Of Use | Contact Us