Sha256: fb78d0a874c14ddc066ae6022f5dbf416ee664336ae96a5b5d7e7b6aa0c67295

Contents?: true

Size: 415 Bytes

Versions: 4

Compression:

Stored size: 415 Bytes

Contents

module Jekyll
  
  module Filters
    def date_to_string(date)
      date.strftime("%d %b %Y")
    end

    def date_to_long_string(date)
      date.strftime("%d %B %Y")
    end
    
    def date_to_xmlschema(date)
      date.xmlschema
    end
    
    def xml_escape(input)
      input.gsub("<", "&lt;").gsub(">", "&gt;")
    end
    
    def number_of_words(input)
      input.split.length
    end    
  end  
end

Version data entries

4 entries across 4 versions & 4 rubygems

Version Path
ddemaree-jekyll-0.2.1 lib/jekyll/filters.rb
gabrielg-jekyll-0.2.2 lib/jekyll/filters.rb
mojombo-jekyll-0.3.0 lib/jekyll/filters.rb
jekyll-0.3.0 lib/jekyll/filters.rb