-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Elchin
Hi.
I want select pages where now between date and end_date or now bigger than date and end_date is empty.
I have five tried variants:
$start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("foo=(date<$start,date_end=''),bar=(date<$start,date_end>=$start),sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date<$start,(date_end='',date_end>=$start),sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date_end=''|date_end>=$start,date<$start,sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("!date_end|date_end>=$start,date<$start,sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date_end>=$start|!date_end,date<$start,sort=-date,limit=12"); All this variants not worked for me and returned zero results.
-
By Eunico Cornelius
I am trying to get the strftime format from the function convertDateFormat(). However, the output has $ signs in it which i cannot use in strftime.(example of conversion : $d/$m/%Y what strftime actually uses: %d/%m/%Y). Am I in the wrong here or is there some way to format strftime? Thank you in advance :).
-
By ksymmons
Hi,
I'm creating a multilingual blog for a client. I'm using Multi-language fields, and it's working great. Essentially, there are two versions of each article: one in English and one in Spanish.
Now, I've created a Datetime field with a "Date/time picker" so that they can add a publication date (no time) to their blog entries. I want the month part of the date to be displayed in whatever language the article is being displayed in. Let's take the following example:
1) "Un artículo de ejemplo", accessible via example.com/un-articulo-de-ejemplo/
2) "A sample article", accessible via example.com/en/a-sample-article/
In this example, for article number 1 I want the date to be "12 ene 2017", and for article number 2 I want it to be "12 jan 2017". In other words, the same format for both languages, but localised. And for some reason, I seem unable to do so and dates are always displayed in English.
Here's the code I'm using to display the date field:
<?= $post->publication_date; ?> How can I get this to work? Thanks.
-
By fbg13
When echoing a date field directly from the $user variable
echo $user->date; the timestamp is printed. Using
echo $users->get($user->id)->date; prints the correct formated value.
Is this a bug or or intended?
-
By MilenKo
Hello all.
I am trying to find a way to have a query with all pages that were published on a specific date (today for example). I read a few posts where people had a specific date field and were limitting the results by that, however is there a way to filter results without a specific date field? As far as I am able to publish the timestamp using $page->created logically I should be able to filter by the result of it? What is the best way to accomplish a filter for a day, week, month etc.?
-