C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
JavaScript Date getMinutes() methodThe JavaScript date getMinutes() method returns the minutes in the specified date on the basis of local time. SyntaxThe getMinutes() method is represented by the following syntax: dateObj.getMinutes() ReturnAn integer value between 0 and 59 that represents the minute. JavaScript Date getMinutes() method exampleHere, we will understand getMinutes() method through various examples. Example 1Let's see an example to print the value of current minute. <script> var min=new Date(); document.writeln(min.getMinutes()); </script> Output: 9 Let's see an example to print the value of minute from the given date. <script> var min=new Date("August 15, 1947 20:22:10"); document.writeln(min.getMinutes()); </script> Output: 22
Next TopicJavaScript Math
|