-
- 24,544 Posts
Sounds like that might be worth a bug report here:
https://github.com/bezumkin/pdoTools
OK, this is not a bug.
https://github.com/bezumkin/pdoTools/issues/105
Can't use strtotime with pdoResources, must use date.
[[+publishedon:date=`%b. %Y`]]
Yes. The data is already a timestamp. MODX helpfully converts it to a string for you, then if you want to modify the format you have to convert it back into a timestamp, then back into a string the way you want it formatted. pdoTools just gives you the timestamp and you do what you want with it in the first place.
Is there going to be some documentation at the rtfm for pdoTools? Anyone know why it isn't there? Using getResources documentation is obviously not appropriate, and little things like this are worth noting. I can't even open the page at docs.modx.pro/en/components/pdotools/ in FF anymore (although Chrome works). It's incomplete anyway, only 4 snippets are documented while the Russian version documents much more.
http://docs.modx.pro/en/components/pdotools/
Snippets
pdoResources 17 june 2015, 19:57
pdoMenu 13 june 2015, 06:00
pdoCrumbs 20 july 2015, 06:56
pdoUsers 14 march 2014, 13:47
Parser 23 march 2014, 20:57
General settings 23 july 2014, 16:58
This is how Chrome translates for me sometimes (it doesn't!). At least the snippets are recognizable to click into and attempt further translation.
http://docs.modx.pro/components/pdotools/
Сниппеты
pdoResources 02 декабря 2014, 06:57
pdoMenu 13 июля 2015, 06:03
pdoPage 30 марта 2015, 17:39
pdoCrumbs 03 апреля 2015, 12:32
pdoUsers 03 апреля 2015, 12:32
pdoSitemap 14 марта 2014, 16:19
pdoNeighbors 03 апреля 2015, 12:32
pdoField 30 марта 2015, 16:31
pdoTitle 30 марта 2015, 17:08
Классы
pdoTools 17 июня 2015, 15:47
pdoFetch 23 мая 2015, 16:30
pdoParser 23 мая 2015, 17:26
-
- 24,544 Posts
Good to know. It's perhaps the way getResources should have done it to begin with, since it saves two unnecessary conversions for every date field you show.
The only differences I'm aware of between getResources and pdoResources tags are the one your found, and the &includeTVs property. It's boolean (0/1) for getResources, but pdoTools expects a comma-separated list of TV names.
What's interesting is that I only learned that a bit ago, yet had working pdoResources with the getResources parameters - &includeTVs=`1` &includeTVList=`tv1,tv2`.
Swear I used them before like this as well.
-
- 24,544 Posts
I haven't looked at the pdoResources code. It may handle them even though they're not documented.