Hot answers tagged

20

Zenbu will let you filter entries by edit_date (similar to the Edit page in ExpressionEngine, see screenshot below). If you don't want to use an add-on you could run a MySQL query to check the edit_date in exp_channel_titles. Something like: SELECT entry_id, title, DATE_FORMAT(edit_date, '%m-%d-%Y-%k:%i') AS updated FROM exp_channel_titles ORDER BY ...


10

Firstly - you need to check that your server has Chinese Encoding installed - if it does, then what you need is the plugin that I wrote many years ago: Date/Time Language Converter You can then use this plugin to wrap your date/time value and specify the language and it'll format it in the appropriate language.


8

Try this: {entry_date format='%F %j'}{if "{entry_date format='%Y%m%d'}" != "{expiration_date format='%Y%m%d'}"}—{expiration_date format='%j'}{/if}, {expiration_date format='%Y'}


7

The Auto Expire addon should do the trick: http://devot-ee.com/add-ons/auto-expire Auto Expire adds the ability to any weblog to automatically expire new entries. It adds a predefined amount of time to the entry date. If an expiration date has already been set, that date will be used as the expiration date.


7

I figure this quick little example would help someone so I've asked and answered my own question: Copyright © {if '{current_time format="%Y"}' > "2010"}2010 - {/if}{current_time format="%Y"}. ACME Inc. All rights reserved. This assumes: a) your start year is 2010 - could be whatever four-digit year you want (since that's what the date ...


7

I wrote a simple plugin to do this and you can also use this plugin (I did not write rangee): http://devot-ee.com/add-ons/rangee


7

The dates need to be formatted properly first to compare them. Something like this: {if {business_expire_date format="%U"} < {current_time format="%U"}}class="expired"{/if} You may need to change the comparison operator < to get desired results.


6

I don't think that's possible. Instead, use the FieldType DropDate instead. It's free and very well done.


5

There are at least three plugins that can format dates like "x time-units ago." Nice Time Time Ago WB Relative Date Since you only need display a relative date for the first two weeks from the entry date, you'll need to wrap your date in a conditional based on {current_time} and use a bit of math. Or as you pointed out in your comment, the Time Ago plugin ...


5

If you want to do it yourself without installing anything or using SQL, this code in a template will display the most recent 5 entries and when they were edited: {exp:channel:entries limit="5" orderby="edit_date" sort="desc" dynamic="no"} {edit_date format="%Y %m %d - %g:%i:%s"}: {title} ({relative_date}) {/exp:channel:entries} The {relative_date} tag ...


5

The following conditional will achieve what you want: {if {current_time format="%m"} <= 6} <p>do Jan through June</p> {if:else} <p>do July through December</p> {/if} Edit: Replying to request for March-thru-September date range: Since the %m flag on the date format represents each month as a number (and conveniently one-...


4

Here are two options you could try. Vim Interactive has a date plug-in, DT Plugin, that lets you set the year offset within the plug-in tag itself. Solspace also has a date plug-in called Date Field Filter. To set the offset you require would mean you need to turn on PHP in your templates. I'd recommend trying Vim's plug-in first and see of this solves your ...


4

Since by default the datepicker does not include seconds, EE saves the current time's seconds (minus 1 second) to the entry date (and in fact any custom date field). So the last part of the timestamp for each of these fields is based on when the entry was created. (Looking under the hood, it appears there have been two approaches over the years to this - at ...


4

If you want to stick with the EE date fieldtype and not display the localized/fixed select then you could use jQuery. To hide them across the board, $('.hasDatepicker').next('select').hide(); will do the trick. CP CSS & JS gives a quick way to add JS to the control panel.


4

Your first 2 tokens are both month tokens. Essentially you're outputting "February February 2013". Try %F %j %Y or %F %d %Y instead. (See PHP date formatting tokens.)


4

Check your site's and user profile's localization settings. It's very likely that you're viewing the site in Safari while logged in as a user with a locale that differs from the locale configured for the site. Documentation: Site Localization Settings, Enabling/disabling User-specific Localization


4

So here's what I've found out: EE uses an INT database field to store a UNIX timestamp Because of this, EE can display dates back to about 1901 Switching the database field from INT to BIGINT fixes the problem, but can dramatically increase the size of that database table I discovered the INT vs BIGINT fix through a web search and tested it with success. I ...


4

Inside your Matrix tag pair this will work: {if expiration_date_column > current_time} {!-- not expired yet, put your row html here --} {/if} Or you can use the search parameter on the Matrix opening tag. This is probably better if you only want your result set to include unexpired rows: {your_matrix_field search:expiration_date_column=">{...


4

I thinks is no such function from the box. You can make ext. I made small example for you. This ext. don't have any ui for settings, so you will need to setup what you want in if ($meta['status'] != $status_prev && $meta['status'] == "closed" ) { $this->EE->api_channel_entries->meta['expiration_date'] = $this->EE->localize->...


3

Yep they can. My emphasis: Dates and Times Are Easy in ExpressionEngine 2.6 Dates will still be stored in the database as Unix timestamps for the time being while it offers the best performance advantages under MySQL, so no need to change your add-ons there. But don’t let that stop you entering dates pre-January 1, 1970, ExpressionEngine will handle it just ...


3

You forgot the '' in your tag : <h5>{event_date format=%D, %F %d, %Y}</h5> Correct : <h5>{event_date format='%D, %F %d, %Y'}</h5>


3

Assuming PHP is enabled in your template, this should get you started... <select name="credit-card-expiration-year" id="credit-card-expiration-year"> <?php for($i = date("Y"); $i < date("Y")+10; $i++){ echo "<option>" . $i . "</option>"; } ?> </select>


3

I posted this as a bug report to Ellis Lab and followed it up with this comment. I think there is a misunderstanding on the meaning of “European” format. By default the dates are shown as mm/dd/yy - which is a US centric format. Switching to “European” changes the format to yyyy-mm-dd - this is certainly more european but is actually ISO 8601 format I ...


3

I would suggest you to use DropDate field type https://github.com/experience/dropdate.ee_addon/wiki, http://devot-ee.com/add-ons/dropdate


3

I hear what you're saying about automating but in reality just how many holidays do you honour? It's not going to take too long to do it manually. I would create a channel for holidays and create an entry for each holiday with the entry and expiration dates set. Then on your template use a channel entries tag pair with show_future_entries="no" In theory ...


3

You're in custom plugin territory Travis. Pretty easy though. Run one (very quick) query to get the latest entry_id in each channel (query exp_channel_titles only). Save them all to an array. Then, you can either return those entry_ids as a variable (concatenated with |), which you pass to your channel:entries tag in your template, or instantiate a new ...


3

Wouldn't you only have to loop through the events on a specific day (today) to see if there is a match for a holiday (and not the entire calendar)? I believe you could use the "Day" loop with a date_range_start of current_time, couldn't you? And since your calendar entries are limited to office holidays, the return of any results for a given day would in ...


3

Creating an "Office Holidays" calendar is a good start. Within that calendar you would create your holiday "events" in the "Calendar: Events" channel. If you're looking to list the upcoming holidays as a list, you can use {exp:calendar:cal}. Don't forget to use calendar_id="" or calendar_name="" is you just want to display events within your "Office ...


3

There wasn't really a question here, but... :) If you're using Solspace Calendar, which I assume you are since you've tagged it as such, you don't have to do this calculation, it's already built into the addon. For instance, you could do this: {exp:calendar:cal date_range_start="{year}-{segment_2}-first" date_range_end="+1 month"}


3

I found this add-on by typing "expressionengine, expiration date required" into Google: http://devot-ee.com/add-ons/required-expiry-date


Only top voted, non community-wiki answers of a minimum length are eligible