Questions tagged [date]

A date is a reference to a particular day represented within a calendar system, and consists of year, month and day.

Filter by
Sorted by
Tagged with
7
votes
1answer
1k views

How to setOffset() in joomla 3.2.3

I am migrating a component from joomla 2.5 to joomla 3.2, I got an error in the method where am using setOffset //old version used in joomla 2.5 $data->setOffset(JFactory::getConfig()->get('...
6
votes
2answers
2k views

Joomla! JFactory::getDate wrong

According to the documentation JFactory/getDate $tzOffset default value is 0. However, the following example: $date_default_offset = JFactory::getDate('now'); echo $date_default_offset->toRFC822(...
3
votes
1answer
394 views

Add days to JFactory::getDate() excluding Weekends (Sat and Sun)

I need to add 15 days more to current date in Joomla excluding Sat and Sun. I added it with following code: JFactory::getDate()->modify('+15 days'); But it doesn't exclude Saturday and Sunday. ...
3
votes
1answer
1k views

Check if date is less than today's date

I need to find if custom date provided by application user is less than today's date or not. I'm trying following code: $today = JFactory::getDate(); // 2015-06-14 16:54:50 ...
3
votes
1answer
448 views

Last Visit Date Override

I am trying to override the Last Visit Date in the admin area of my Joomla 3.4.1 site. I have manually made overrides to the following constants (site and admin) and it's not making any difference ...
2
votes
1answer
9k views

Change Date Format in Article Editing page on Publishing tab

I would like to change the date format of the following fields Article Editing page on Publishing tab): Start Publishing Finish Publishing Created Date Modified Date The format is by default Y-m-d H:...
2
votes
1answer
290 views

Joomla Timezone

I would like to check the time within a sub controller's method. The calendar field in my JForm saves the datetime to sql and uses UTC. So now we have 15:11h in Germany and in the database would be ...
2
votes
1answer
100 views

How to reformat a date string? [duplicate]

I'm trying to enter the date in tags default_items.php (in an override) to see the date in tags list. I am using <?php echo $item->displayDate; ?> and this prints: 2018-08-04 06:04:37, but I'...
2
votes
1answer
71 views

Strange behavior with dates

I would like to store the input of the calendar-field in my JTable::store. To do so I'm doing this: Form-declaration: <field name="creationdate" type="calendar" default=...
2
votes
1answer
366 views

How to set localised format for dates in a calendar field of a form?

tI want to add a calendar field to my custom form: http://docs.joomla.org/Calendar_form_field_type But I'd like that expected date format would be different depending on user's active language, as "...
2
votes
1answer
237 views

Category blog ordering not working

I had a question about category blog layout ordening, I have a lot of articles from november, but last I added a lot of articles trough a API from august. The import was all good and nothing was wrong ...
2
votes
1answer
111 views

How to set timeoffset for a specific date with JDdate

I tried to apply timezone offset to a variable. Here is my code $time_offset = "Australia/Sydney"; $start_time = "2015-07-31 15:03:00"; $date_end = JDate::getInstance('now', $time_offset); $...
2
votes
1answer
315 views

How to change date format in JHTML::calendar to d-m-Y?

In a form I have a date/time-field. It works correctly, but the format of the date isn't right -- I require Dutch date notation (d-m-Y). Instead of day-month-year it displays and saves it as year-...
1
vote
2answers
1k views

How to get the date with timezone offset applied [duplicate]

The following code works and outputs the date for the different offsets: echo 'Australia/Sydney' . JFactory::getDate('now', 'Australia/Sydney'); echo "<BR>"; echo 'UTC' . JFactory::getDate('now'...
1
vote
1answer
51 views

How to add 5 hours to a datetime stamp?

I've set up an edit column in the database, it stamps the correct time whenever a change is made to the database entry. For some odd reason whenever this datetime displays it displays 5 hours behind ...
1
vote
1answer
55 views

Is there a Joomla function to determine the last fiscal quarter?

Just getting started with Joomla Dates - is there a convenient way to determine what the from/to dates of the last fiscal quarter are?
1
vote
1answer
174 views

Joomla 3.6.2 - Generate datePublished and link of img of item

I have a problem on the generation of an article creation date . The code is inside the script google < script type = " application / ld + json " > and my code is this : <?php echo JHTML::_('...
1
vote
2answers
305 views

after upgrade to 3.6 error time zone

After migrating from Joomla 2.5 to 3.6, I get the following error on the homepage: DateTimeZone::__construct(): Unknown or bad timezone (0) Does anyone know how I can overcome this?
0
votes
3answers
801 views

Reformat DATETIME type value to European date format

I have a select query which returns a DATETIME value (stored format: YYYY-MM-DD HH:MM:SS). I want to show this on my site in "Euro date format" in other words d-m-y format. So what sql code should ...
0
votes
0answers
108 views

In “Date Format” section, what code makes the date relative?

This code will show the date of publishing like: 4:30 10/7/2015 I want the date be like: 2 hours and 15 minutes ago this setting is on showcase modules ("news show pro GK4" in this case) for ...