Make Easy

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.

07/04/2025
Santa Clarita
23/08/2024

Santa Clarita

05/10/2022
01/01/2016

Wish Happy New Year all of you.....!!!

Diwali night is full of lights,Crackers may your life be filled with colors and lights of happiness. Happy Diwali to all...
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..!

Wishing u a very  happy independence day
15/08/2015

Wishing u a very happy independence day

20/11/2014


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);

}

20/11/2014

minutes

20/11/2014

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();

23/10/2014

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 !!

Address

Noida
201301

Telephone

9958498511

Alerts

Be the first to know and let us send you an email when Make Easy posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Make Easy:

Share