• Resolved andytruetone

    (@andytruetone)


    First off – I love this plugin and will be donating. This helps big time.

    I see you have ways to add extra text based on object values, like {street:ifNotEmptyAddRight:extratext} but do you also have ways to delete text I don’t want on the page?

    For example, get “2003-09-19” out of a date formatted like “2003-09-19T00:00:00Z” with functions like…

    {date:ifNotEmptyDelRight:10}
    {date:ifNotEmptyDel:T00:00:00Z}
    {date:left:10}

    https://wordpress.org/plugins/json-content-importer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author berkux

    (@berkux)

    Hi andytruetone,

    thank you for using my plugin and your request.
    Your good ideas are not implemented yet.
    I’ll see how I can do this.

    Bernhard

    Plugin Author berkux

    (@berkux)

    My approach:

    {KEY:ifNotEmptyDel:3,8}
    This would give a part of the KEY-value: Starting at char 3 it gives the next 8 chars (PHP-substr).

    {KEY:datetime,”DATEFORMAT”, “TIMEZONEOFFSET”}
    The KEY-value has to be date/time-data PHP-strtotime can handle:
    http://php.net/manual/en/function.strtotime.php
    “DATEFORMAT” defines the desired display-format.
    “TIMEZONEOFFSET” is an integer.

    Plugin Author berkux

    (@berkux)

    ifNotEmptyDel is part of the pro-version, see:
    http://json-content-importer.com/download/

    Hi There,

    I’m on the Pro Version trail right now, and only need to solve one thing so I can go ahead and purchase the plugin – which is great by the way 🙂

    I have a date which looks like this: 2015-08-28T06:26:00+0000
    and I want to convert it to look like this: 2015/08/28

    I tried to use the DATEFORMAT but I had no luck figuring it out.

    Thank you!

    Plugin Author berkux

    (@berkux)

    WE solved that via mail…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Any way to replace, regex or limit number of characters in text?’ is closed to new replies.