Opened 11 years ago

Closed 11 years ago

#6581 closed Bugs (invalid)

Ordinal formatting does not work as documented

Reported by: dtrebbien@… Owned by: Artyom Beilis
Milestone: To Be Determined Component: locale
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc: dtrebbien@…

Description

The Boost.Locale page Localized Text Formatting mentions the following:

The following format key-value pairs are supported:

...

  • ord or ordinal -- format an ordinal number (1st, 2nd... etc)

Attached is a short program that tries both ord and ordinal. The actual output is:

1
1

Expected output:

1st
1st

Attachments (1)

locale_ord_test.cpp (276 bytes ) - added by dtrebbien@… 11 years ago.
Test case

Download all attachments as: .zip

Change History (2)

by dtrebbien@…, 11 years ago

Attachment: locale_ord_test.cpp added

Test case

comment:1 by Artyom Beilis, 11 years ago

Resolution: invalid
Status: newclosed

Your code is wrong:

Read: http://www.boost.org/doc/libs/1_48_0/libs/locale/doc/html/faq.html

Also you need to build Boost.Locale with ICU in order to get ordinal support.

Note: See TracTickets for help on using tickets.