Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Konstantin Pankratov

    (@pankratovkm)

    I appreciate it!

    I added this functionality in the last update (v2.0.2), so you can update the plugin!

    Thread Starter CBServices

    (@cbservices)

    How do I use it?

    Plugin Author Konstantin Pankratov

    (@pankratovkm)

    Also using the shortcode, like:
    [TotalDatetimeDifference startDate="31.12.2020" endDate="now" format="h"]
    This will output the number 4728, which is how many hours have passed since 12.31.2020.

    You can put different values in the format to calculate the DateTime difference in them:
    y – for years
    m – for months
    w – for weeks
    d – for days
    h – for hours
    i – for minutes
    s – for seconds

    Thread Starter CBServices

    (@cbservices)

    If i do this:

    [DatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]

    It gives me 11

    So I think it’s not working 😉

    Thread Starter CBServices

    (@cbservices)

    Ohhhhhh… TotalDateTimeDifference 🙂
    Lemme try again 🙂

    Thread Starter CBServices

    (@cbservices)

    Nope, when i do: [TotalDatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]

    I get:

    [TotalDatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]

    It’s not converting to a time…

    Thread Starter CBServices

    (@cbservices)

    Found it, without the time it does work 🙂
    But, I want with the time 🙂

    [TotalDatetimeDifference startDate=”09.07.2021″ endDate=”now” format=”h”]

    = 181

    But [TotalDatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]

    Should give: 179

    By the way, your personal website rocks!

    Plugin Author Konstantin Pankratov

    (@pankratovkm)

    It looks like we have the same time zone (CET), I just checked and it gives me 179.

    Input: https://snipboard.io/iYgkzG.jpg
    Output: https://snipboard.io/PdHGfM.jpg

    Make sure that you have the correct time zone selected in the WordPress dashboard > Settings > General: https://snipboard.io/Y60ErS.jpg

    Thread Starter CBServices

    (@cbservices)

    I guess it had some formatting when I was testing because now it works ok.
    Thank you very much!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Love it…’ is closed to new replies.