From 735401c2c4d8684544cce7ee42b629d561e207ec Mon Sep 17 00:00:00 2001 From: dev-chiefworks Date: Sun, 13 Feb 2022 10:16:37 -0500 Subject: [PATCH] Blog time fixed --- src/components/HomeOne/BlogHomeOne.js | 4 +++- src/components/News/Blogs.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/HomeOne/BlogHomeOne.js b/src/components/HomeOne/BlogHomeOne.js index d9841b8..96a4253 100644 --- a/src/components/HomeOne/BlogHomeOne.js +++ b/src/components/HomeOne/BlogHomeOne.js @@ -52,6 +52,8 @@ var res = null; { blogResult.map(i=>{ + var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; + var postDt = new Date(i.post_date).toLocaleDateString("en-US", options); var blgImg = i.meta_value!=null?"https://blog.wrenchboard.com/wp-content/uploads/"+ i.meta_value : blogOne; return (
    -
  • {i.post_date}
  • +
  • {postDt}

diff --git a/src/components/News/Blogs.js b/src/components/News/Blogs.js index 10f6ec4..cb4cfa6 100644 --- a/src/components/News/Blogs.js +++ b/src/components/News/Blogs.js @@ -13,6 +13,8 @@ function Blogs() { { BlogDataResult.map(i => { + var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; + var postDt = new Date(i.post_date).toLocaleDateString("en-US", options); var blgImg = i.meta_value != null ? "https://blog.wrenchboard.com/wp-content/uploads/" + i.meta_value : blogOne; return (
    -
  • {i.post_date}
  • +
  • {postDt}