Sha256: 57918c1231eb042c1463dff14f395dddfeeabc5250599e3ac975f16b77f892d6

Contents?: true

Size: 375 Bytes

Versions: 7

Compression:

Stored size: 375 Bytes

Contents

require 'webgen/tag'

module Webgen::Tag

  # Prints out the date using a format string which will be passed to Time#strftime. Therefore you
  # can use everything Time#strftime offers.
  class Date

    include Base

    # Return the current date formatted as specified.
    def call(tag, body, context)
      Time.now.strftime(param('tag.date.format'))
    end

  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
gettalong-webgen-0.5.4.20080929 lib/webgen/tag/date.rb
gettalong-webgen-0.5.5.20081001 lib/webgen/tag/date.rb
webgen-0.5.2 lib/webgen/tag/date.rb
webgen-0.5.4 lib/webgen/tag/date.rb
webgen-0.5.3 lib/webgen/tag/date.rb
webgen-0.5.1 lib/webgen/tag/date.rb
webgen-0.5.5 lib/webgen/tag/date.rb