Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8937035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:20:35+00:00 2026-06-15T10:20:35+00:00

In Jekyll, I would really like to have the date format as 2nd December

  • 0

In Jekyll, I would really like to have the date format as “2nd December 2012” — i.e. with the ordinal, rather than just “2 December 2012”.

I see that there’s an ordinalize function available in Ruby to do this, but I haven’t had any luck combining it with Liquid and Jekyll.

How can I format dates as I would like?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:20:35+00:00Added an answer on June 15, 2026 at 10:20 am

    I solved this by writing the following Jekyll plugin, which I placed in the _plugins directory with an arbitrary name, e.g. date.rb:

    require 'date'
    require 'facets/integer/ordinal'
    
    module Jekyll
      module DateFilter
        def pretty(date)
          "#{date.strftime('%e').to_i.ordinalize} #{date.strftime('%B')} #{date.strftime('%Y')}"
        end  
      end
    end
    
    Liquid::Template.register_filter(Jekyll::DateFilter)
    

    Then — having installed the facets Ruby gem — I was able to use {{ post.date | pretty }} in my site, and all was well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to deploy a site generated with Jekyll and would like to keep
I have a custom page for Jekyll: I have a news.markdown file like the
I would like to write a Jekyll plugin that makes all posts available in
I have a Jekyll app (using Liquid) and I'd like to know how to,
I have to parse YAML Front Matter in java like jekyll , So Iooked
I would like to have a set of links <li> <h2>Random Articles</h2> <ul> <li><a
I have a Jekyll (Liquid) block plugin and I'd like to detect what the
I am looking into migrating my site from Wordpress to Jekyll and would like
I have a jekyll site with filestructure like so: ▾ _includes/ post-entry.html ▾ _posts/
I have a Jekyll blog and I want to use MathJax with it, in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.