toLocaleTimeString() always showing leading zero

I would like to display this as something like: 4:26 PM.

But what I keep getting is: 04:26 PM.

If I remove the hour and minute options from toLocaleTimeString(), it works, but it also displays seconds, which I don’t want.

myClock();
function myClock() { 
    var d = new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});   
    document.getElementById("clock").innerHTML = d; 
}
setInterval(myClock, 1000);
<div id="clock"></div>

155 thoughts on “toLocaleTimeString() always showing leading zero”

  1. I’ve actually enjoyed inspecting back for new material on your
    site weekly. I can’t wait to see how it continues
    to create. I would certainly be interested to see exactly how you
    would certainly create a site in the songs room. Your web content is
    superior currently, as well as I believe it
    would translate well to various other niches as well as sectors.

    Reply
  2. I have actually truly appreciated checking back for brand-new
    web content on your website weekly. I can’t wait to see just how it remains to establish.
    I would certainly be interested to see just how you ‘d create a web
    site in the music area. Your web content is superior
    already, and I believe it would convert well to various
    other specific niches and also markets.

    Reply
  3. I have actually really enjoyed inspecting back for new
    material on your site weekly. I can’t wait to see just how it continues to
    establish. I would certainly be interested to see exactly how you ‘d generate
    a site in the music space. Your web content is top-notch already,
    and also I assume it would certainly equate well
    to various other specific niches and also industries.

    Reply
  4. Hi there, just became alert to your blog through
    Google, and found that it’s truly informative.
    I’m going to watch out for brussels. I’ll appreciate
    if you continue this in future. Numerous people will be benefited from your writing.
    Cheers!

    Reply
  5. Generally I don’t read article on blogs, but I would like to say that this write-up very forced
    me to check out and do it! Your writing taste has been surprised me.

    Thanks, very great article.

    Reply
  6. Hello! Would you mind if I share your blog with my zynga group?
    There’s a lot of folks that I think would really appreciate your content.
    Please let me know. Cheers

    Reply
  7. of course like your web-site but you have to take a look at the spelling on several of your posts.
    A number of them are rife with spelling issues and I find
    it very bothersome to tell the truth then again I will surely come again again.

    Reply
  8. It is the best time to make some plans for the future and it is
    time to be happy. I’ve read this post and if I could I want
    to suggest you few interesting things or tips. Maybe you could write next articles referring to this article.
    I wish to read even more things about it!

    Reply
  9. Hello my family member! I wish to say that this post is awesome,
    nice written and include approximately all significant infos.
    I would like to look extra posts like this .

    Reply
  10. Helpful information. Fortunate me I discovered your web site by accident, and I am stunned why this
    coincidence didn’t took place in advance! I bookmarked it.

    Reply
  11. Hi! Do you know if they make any plugins to safeguard
    against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations?

    Reply
  12. Hiya! I know this is kinda off topic nevertheless I’d figured
    I’d ask. Would you be interested in trading links or maybe
    guest authoring a blog post or vice-versa? My site covers a lot of the same subjects as yours and I
    think we could greatly benefit from each other. If
    you’re interested feel free to send me an e-mail.
    I look forward to hearing from you! Superb blog by the way!

    Reply
  13. Excellent way of telling, and good piece of writing to get data concerning my presentation subject, which i
    am going to present in institution of higher education.

    Reply
  14. Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I will
    revisit yet again since I saved as a favorite it.
    Money and freedom is the greatest way to change, may you be rich and continue to help others.

    Reply
  15. I have to thank you for the efforts you have put in writing this website.

    I’m hoping to check out the same high-grade blog posts by you later on as well.
    In truth, your creative writing abilities has inspired me to get my very own website now 😉

    Reply
  16. I don’t know whether it’s just me or if perhaps everybody else encountering problems with your blog.
    It seems like some of the text in your posts are running off
    the screen. Can someone else please comment and let me know if this is happening to them
    too? This could be a problem with my browser because I’ve
    had this happen previously. Kudos

    Reply
  17. you are in point of fact a just right webmaster.
    The site loading velocity is incredible. It sort of feels that you are doing any distinctive trick.
    Also, The contents are masterwork. you’ve performed
    a fantastic process in this topic!

    Reply
  18. Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you! By the way, how could we communicate?

    Reply
  19. Magnificent beat ! I wish to apprentice while you amend your web site, how could i subscribe for
    a weblog website? The account helped me a appropriate deal.

    I were a little bit acquainted of this your broadcast offered vivid transparent
    concept

    Reply
  20. Hey are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and create
    my own. Do you need any coding knowledge to make your own blog?
    Any help would be greatly appreciated!

    Reply
  21. Wonderful blog you have here but I was curious if you
    knew of any discussion boards that cover the same topics talked about in this article?
    I’d really love to be a part of online community where I can get responses from other knowledgeable individuals that share the same interest.
    If you have any suggestions, please let me know.
    Kudos!

    Reply
  22. Hey there would you mind letting me know which web host you’re utilizing?
    I’ve loaded your blog in 3 completely different internet browsers and I must say this blog loads a lot faster then most.

    Can you recommend a good hosting provider at a reasonable
    price? Thanks a lot, I appreciate it!

    Reply
  23. Hi there to every body, it’s my first go to see of
    this website; this web site includes amazing and genuinely fine material in favor of visitors.

    Reply
  24. I was wondering if you ever thought of changing the
    structure of your blog? Its very well written; I love
    what youve got to say. But maybe you could a little more in the way of content so people could connect
    with it better. Youve got an awful lot of text for only having one or two pictures.

    Maybe you could space it out better?

    Reply
  25. Excellent beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog
    website? The account helped me a acceptable deal. I had been a
    little bit acquainted of this your broadcast provided
    bright clear concept

    Reply
  26. Hello there! This blog post could not be written any better!
    Looking through this post reminds me of my previous roommate!
    He constantly kept talking about this. I will forward this information to him.

    Fairly certain he’s going to have a very good read. I appreciate you for sharing!

    Reply
  27. I take pleasure in, result in I found exactly what I used to be looking for.
    You’ve ended my four day lengthy hunt! God Bless you man. Have a nice
    day. Bye

    Reply
  28. Hi there I am so delighted I found your webpage, I really found you by error, while I was searching on Aol for
    something else, Regardless I am here now and would
    just like to say thank you for a fantastic post and
    a all round thrilling blog (I also love the theme/design),
    I don’t have time to go through it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time
    I will be back to read more, Please do keep
    up the awesome jo.

    Reply
  29. Valuable info. Lucky me I discovered your web site by accident, and I’m surprised why this twist of fate did not
    took place in advance! I bookmarked it.

    Reply
  30. Pretty nice post. I just stumbled upon your weblog and wished to say
    that I have really enjoyed browsing your blog posts.
    In any case I’ll be subscribing to your feed and I hope you write again soon!

    Reply
  31. Hello it’s me, I am also visiting this website daily, this web
    page is really fastidious and the viewers are in fact sharing pleasant thoughts.

    Reply
  32. Fine way of describing, and good post to get facts concerning my presentation focus, which i am going to
    convey in institution of higher education.

    Reply
  33. Woah! I’m really digging the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between user friendliness and visual appeal.
    I must say you have done a excellent job with this. In addition, the blog loads very quick for me on Chrome.
    Superb Blog!

    Reply
  34. hey there and thank you for your info – I’ve definitely picked up anything new from right here.
    I did however expertise some technical issues using this website, since I experienced to reload the site a lot of
    times previous to I could get it to load correctly.
    I had been wondering if your web hosting is OK?
    Not that I am complaining, but slow loading instances times will often affect your placement in google and could damage your high quality score if ads
    and marketing with Adwords. Well I am adding this RSS to my e-mail and could look out for a lot more of your respective fascinating content.
    Ensure that you update this again very soon.

    Reply
  35. Do you have a spam problem on this site; I also am a blogger, and I was wanting to know your situation; many
    of us have developed some nice procedures and we
    are looking to swap methods with others, be sure to shoot me an email if interested.

    Reply
  36. hi!,I love your writing very so much! share we be in contact more approximately your article on AOL?

    I need a specialist in this house to solve my problem. May be that’s you!
    Looking forward to look you.

    Reply
  37. My spouse and I absolutely love your blog and find the majority of your post’s to be precisely what I’m looking
    for. Do you offer guest writers to write content available for you?
    I wouldn’t mind producing a post or elaborating on many
    of the subjects you write related to here. Again, awesome site!

    Reply
  38. I don’t even understand how I finished up here, however I assumed this publish was good.
    I do not recognize who you are but certainly you are going to a famous
    blogger if you happen to aren’t already. Cheers!

    Reply
  39. I’m not that much of a online reader to be
    honest but your blogs really nice, keep it up!

    I’ll go ahead and bookmark your website to come back
    down the road. Cheers

    Reply
  40. Undeniably believe that which you said. Your favorite justification seemed to be on the net
    the simplest thing to be aware of. I say to you, I certainly get irked while people
    think about worries that they plainly do not know
    about. You managed to hit the nail upon the top and defined
    out the whole thing without having side-effects , people can take a
    signal. Will probably be back to get more. Thanks

    Reply
  41. I enjoy, lead to I discovered exactly what I used to be having a look for.

    You’ve ended my 4 day long hunt! God Bless you man. Have a nice day.
    Bye

    Reply