Last Updated Plugin Documentation

[ Last Updated ]

Last Updated Plugins

Last Updated plugins provide formatting of date/time to show with the Last Updated block.

Functionality can be extended by adding plugin classes for additional Updated Plugins. Last Updated plugins are simple classes that provide the functionality to adapt Last Updated to alternative date/time formatting. They should inherit from UpdatedPluginBase. Details are provided by comments in the code.

Plugins can be added by placing the plugin classes at packages/anyPackageName/src/LastUpdated/UpdatedPlugins/PluginName or application/src/LastUpdated/UpdatedPlugins/PluginName. Plugins can also be similarly placed beneath any namespace declared in a package controller's AutoloaderRegistries.

[ Last Updated ]

Carbon Humans

Formatted using carbon library difference for humans.

Use the carbon.php class and the diffForHumans() method to format the time differnce.

10 seconds ago; 3 minutes ago; 3 hours ago; 1 day ago; 3 days ago; 1 week ago; 1 month ago; 1 month ago; 3 months ago; 1 year ago; 3 years ago.

[ Last Updated ]

Date Helper Absolute

Use the core date helper to present formatted date/time.

Formats date and time using formatting utilities of the core date helper. Optionally show the full timestamp, date only, or contextual version based on how long ago, with time only for less than one day and either date only or a full timestamp for greater than one day.

23:26; 23:23; 20:26; Yesterday; 16 May 2019; 11 May 2019; 19 Apr 2019; 14 Apr 2019; 15 Feb 2019; 17 May 2018; 19 May 2016.

[ Last Updated ]

Date Helper Difference

Use the core date helper to present formatted date/time difference.

Formats date and time difference using formatting utilities of the core date helper.

10 seconds; 3 minutes; 3 hours; 1 day; 3 days; 8 days; 30 days; 35 days; 93 days; 367 days; 1095 days.

[ Last Updated ]

Friendly Time

Very simple translation of interval into a frendly note about time.

Formats date and time to a resolution of the largest unit, such as seconds, minutes, hours, days, weeks, months. Makes approximations that are not stricly correct, but if you can accept slight liberties with intervals, this could be what you want.

just now; a few minutes ago; 3 hours ago; yesterday; 3 days ago; a week ago; 4 weeks ago; a month ago; 3 months ago; a year ago; 3 years ago.

[ Last Updated ]

Legacy Constants

Use the format string constants from legacy concrete5.

Formats date and time using the date/time strings provided as constants in the legacy version of concrete5.

May 19, 2019 at 11:26 pm; May 19, 2019 at 11:23 pm; May 19, 2019 at 8:26 pm; May 18, 2019 at 10:26 pm; May 16, 2019 at 11:26 pm; May 11, 2019 at 11:26 pm; April 19, 2019 at 11:26 pm; April 14, 2019 at 11:26 pm; February 15, 2019 at 10:26 pm; May 17, 2018 at 11:26 pm; May 19, 2016 at 11:26 pm.

[ Last Updated ]

None

Apply no time formatting. Simply return what was provided.

Provided as a minimal example from which other updated plugings can be designed.

2019-05-19 23:26:38; 2019-05-19 23:23:48; 2019-05-19 20:26:48; 2019-05-18 22:26:48; 2019-05-16 23:26:48; 2019-05-11 23:26:48; 2019-04-19 23:26:48; 2019-04-14 23:26:48; 2019-02-15 22:26:48; 2018-05-17 23:26:48; 2016-05-19 23:26:48.

[ Last Updated ]

PHP Date Format

Format using a PHP date format string.

Formats date and time using the core date helper with your own format string with the format characters and constants specified in the PHP Documentation. The default is the string used in concrete5.6: "F d, Y \a\t g:i A".

May 19, 2019 at 11:26 pm; May 19, 2019 at 11:23 pm; May 19, 2019 at 8:26 pm; May 18, 2019 at 10:26 pm; May 16, 2019 at 11:26 pm; May 11, 2019 at 11:26 pm; April 19, 2019 at 11:26 pm; April 14, 2019 at 11:26 pm; February 15, 2019 at 10:26 pm; May 17, 2018 at 11:26 pm; May 19, 2016 at 11:26 pm.

[ Last Updated ]

SQL Time

Formatted as a database timestamp.

Optionally show the full timestamp, date only, or contextual version based on how long ago, with time only for less than one day and either date only or a full timestamp for greater than one day.

23:26:38; 23:23:48; 20:26:48; 2019-05-18; 2019-05-16; 2019-05-11; 2019-04-19; 2019-04-14; 2019-02-15; 2018-05-17; 2016-05-19.