<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Antville Macros</title>
    <link>https://macros.antville.org/</link>
    <description />
    <language>en</language>
    <pubDate>Wed, 14 Oct 2026 11:11:51 GMT</pubDate>
    <dc:date>2026-10-14T11:11:51Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>&amp;lt;% now %&amp;gt;</title>
      <link>https://macros.antville.org/stories/246588/</link>
      <description>&lt;p&gt;This macro does what you expect: it returns the current date and time. For more information about how to format see &lt;a title="" href="http://macros.antville.org/stories/244877/"&gt;date and time&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 03 Jan 2003 10:45:08 GMT</pubDate>
      <guid>https://macros.antville.org/stories/246588/</guid>
      <dc:creator>robert</dc:creator>
      <dc:date>2003-01-03T10:45:08Z</dc:date>
    </item>
    <item>
      <title>date and time (and how to format them)</title>
      <link>https://macros.antville.org/stories/244877/</link>
      <description>&lt;p&gt;For most items of a weblog (images, files, stories, comments) and also the weblog itself Antville keeps track of the date and time it was created and when it was last modified. There are two basic macros, &lt;tt&gt;createtime&lt;/tt&gt; and &lt;tt&gt;modifytime&lt;/tt&gt;, that you can use for display.&lt;/p&gt;&lt;p&gt;The weblog itself in addition has a special macro called &lt;tt&gt;lastupdate&lt;/tt&gt; that will contain the date and time whenever an item inside a weblog (or the weblog itself) was updated or a new one was created.&lt;/p&gt;&lt;p&gt;Now, here are a few examples:&lt;/p&gt;&lt;p&gt;&lt;tt&gt;&amp;lt;% story.createtime format=&amp;quot;short&amp;quot; %&amp;gt;&lt;/tt&gt;&lt;/p&gt;&lt;p&gt;This will give you the date and time when your weblog was created, using the default &amp;quot;short&amp;quot; formatting as you defined it in the preferences of your weblog. To use the long format simply use the option &lt;tt&gt;format=&amp;quot;long&amp;quot;&lt;/tt&gt;&lt;/p&gt;&lt;p&gt;To display the date and time when eg. an image was modifed place the following somewhere in a skin:&lt;/p&gt;&lt;p&gt;&lt;tt&gt;&amp;lt;% image.modifytime format=&amp;quot;long&amp;quot; %&amp;gt;&lt;/tt&gt;&lt;/p&gt;&lt;p&gt;And to display the date and time your weblog was last updated place this eg. in the main skin:&lt;/p&gt;&lt;p&gt;&lt;tt&gt;&amp;lt;% site.lastupdate format=&amp;quot;EE, dd.MM.yyyy, HH:mm&amp;quot; %&amp;gt;&lt;/tt&gt;&lt;/p&gt;&lt;p&gt;In this example we're using a custom formatting pattern, where each part of it will return the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;tt&gt;EE&lt;/tt&gt; the abbreviated day name (eg. "Mon")&lt;/li&gt;&lt;li&gt;&lt;tt&gt;dd&lt;/tt&gt; the day of the month with a leading zero if necessary (to avoid that use a single 'd')&lt;/li&gt;&lt;li&gt;&lt;tt&gt;MM&lt;/tt&gt; the month of the year, also using a leading zero. M will avoid the leading zero, MMM will give you the abbreviated month name, MMMM the full name of it.&lt;/li&gt;&lt;li&gt;&lt;tt&gt;yyyy&lt;/tt&gt; the year displayed as four digits. yy will use just the last two digits.&lt;/li&gt;&lt;li&gt;&lt;tt&gt;HH&lt;/tt&gt; means the hour of the day&lt;/li&gt;&lt;li&gt;&lt;tt&gt;mm&lt;/tt&gt; means the minute of the hour&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There are a lot more patterns you can use for formatting date and time, you can find a complete list in sun's java api &lt;a title="" href="http://java.sun.com/j2se/1.4.1/docs/api/java/text/SimpleDateFormat.html"&gt;documentation&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The output of these macros will change according to the language you defined in the preferences of your weblog, with one exception: if you use &lt;tt&gt;site.lastupdate&lt;/tt&gt; and there were no updates in your weblog so far, it will display the text &lt;tt&gt;no updates so far&lt;/tt&gt;, all other macros won't display anything.&lt;/p&gt;</description>
      <pubDate>Tue, 31 Dec 2002 15:14:40 GMT</pubDate>
      <guid>https://macros.antville.org/stories/244877/</guid>
      <dc:creator>robert</dc:creator>
      <dc:date>2002-12-31T15:14:40Z</dc:date>
    </item>
  </channel>
</rss>

