Make Easy
Bringing ideas to life through innovative design. Let's turn your vision
Specializing in brand identity, web design, and digital art, we craft visually compelling stories that resonate with your audience.
23/08/2024
Santa Clarita
05/10/2022
Wish Happy New Year all of you.....!!!
10/11/2015
Diwali night is full of lights,Crackers may your life be filled with colors and lights of happiness. Happy Diwali to all of my friends..!
Getting Started: Building a Chrome Extension
https://developer.chrome.com/extensions/getstarted
15/08/2015
Wishing u a very happy independence day
function myFunction() {
var myDate = new Date("11/20/2014 11:30 PM");
var hours = myDate.getHours();
var myDate1 = new Date("11/21/2014 02:00 AM");
var hours1 = myDate1.getHours();
var am1 = true;
if(myDate>myDate1)
{
alert("yes");
}
var minutes = myDate.getMinutes();
alert("It is " + hours + " " + hours1);
}
minutes
down vote
Here's a reasonably terse way to do it using a Prototype:
Date.prototype.getFormattedTime = function () {
var hours = this.getHours() == 0 ? "12" : this.getHours() > 12 ? this.getHours() - 12 : this.getHours();
var minutes = (this.getMinutes() < 10 ? "0" : "") + this.getMinutes();
var ampm = this.getHours() < 12 ? "AM" : "PM";
var formattedTime = hours + ":" + minutes + " " + ampm;
return formattedTime;
}
Then all you have to do is convert your string value to a date and use the new method:
var stringValue = "February 04, 2011 19:00:00;
var dateValue = new Date(stringValue);
var formattedTime = dateValue.getFormattedTime();
Or in a single line:
var formattedTime = new Date("February 04, 2011 19:00:00").getFormattedTime();
Deepawali ka yeh paawan tyohar, Aapke Jeevan mein laye khushiya aapar. Shri Laxmi ji viraje aapke dwaar, Yeh Subhkamnayen hamari karen sweekar!! Wishing u & ur family a very Happy Diwali !!
Click here to claim your Sponsored Listing.
Category
Contact the business
Telephone
Website
Address
Noida
201301