Jump to content

Date format function


ChrisTERiS

Recommended Posts

17 minutes ago, brian! said:

Thank you so much !! ..... Works on the meaning that it shows the date, but don't know if my setup is correct.

My settings are:

image.png.f2aa3dfd73791ae0a71da9f637527e0a.png

The code is:

$blog["postdate"] = fromMySQLDate($decodedata[$key]["postdate"], $includeTime, $applyClientDateFormat);

And the result is this:

image.png.742834b78f28bab62f99dd1b0a4e7e7c.png

While I want something like this:

image.png.a69200da4a337fa0988b990e92e94b68.png

Is this possible?

PS: Sunday, January 17, 2021 

image.png

Edited by WHMUp
Link to comment
Share on other sites

bear in mind that $includeTime and $applyClientDateFormat are meant to be replaced by boolean flags, e.g they are going to be true or false, so I think your code should really be...

$blog["postdate"] = fromMySQLDate($decodedata[$key]["postdate"],true,true);

if you don't want to include the time in the output, it would be false, true.

Link to comment
Share on other sites

@brian! AWESOME !! Only the Sunday is missing, but is not important.

Also thank you for teaching me that "Bear in mind". I use to say "Keep in mind", but for sure you know better 🙂

PS: With some page refreshes "Sunday" appeared in the date format, so everything is fine.

Edited by WHMUp
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated