Project

General

Profile

Actions

Feature #8181

closed

New flag for strftime that supports adding ordinal suffixes to numbers

Added by tkellen (Tyler Kellen) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
[ruby-core:53808]

Description

This is my first issue on the ruby tracker--hopefully I'm asking in the right place?

It would be nice if you could use strftime to generate dates with ordinal suffixes. I propose the addition of another flag to support this: the @ character.

The intended usage would be:

Date.parse('2013-03-01').strftime('%B %@d, %Y')
=> "March 1st, 2013"
Date.parse('2013-03-02').strftime('%B %@d, %Y')
=> "March 2nd, 2013"
Date.parse('2013-03-03').strftime('%B %@d, %Y')
=> "March 3rd, 2013"

...etc

Assuming this would be accepted, I'd be happy to implement the feature. Could someone tell me how to proceed?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0