Bug 54590 - Manual entry for the tstamp task uses incorrect country code UK in locale example
Summary: Manual entry for the tstamp task uses incorrect country code UK in locale exa...
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 1.8.4
Hardware: PC All
: P2 normal (vote)
Target Milestone: 1.9.0
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2013-02-20 17:59 UTC by Nicko Cadell
Modified: 2013-03-04 09:10 UTC (History)
2 users (show)



Attachments
Patch for doc fix (609 bytes, patch)
2013-02-26 10:03 UTC, Patrick Altaie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicko Cadell 2013-02-20 17:59:08 UTC
The manual entry for the tstamp task (http://ant.apache.org/manual/Tasks/tstamp.html) provides an example of how to configure the time stamp date format using a locale. This is the example:

  <tstamp>
    <format property="TODAY_UK" pattern="d-MMMM-yyyy" locale="en,UK"/>
  </tstamp>

Unfortunately UK is not a valid country code for a locale. I think the intention was to use GB as the country code. GB is the iso country code for the United Kingdom of Great Britain and Northern Ireland.

The Java Locale class doesn't really make this very clear by defining a constant called UK for the en,GB locale. See http://www.docjar.com/html/api/java/util/Locale.java.html#481

Please update the example in the manual to have the locale set to "en,GB".
Comment 1 Patrick Altaie 2013-02-26 10:03:58 UTC
Created attachment 29993 [details]
Patch for doc fix

Added a patch to fix this. Tested with Ant 1.8.3 on Windows 7 (not that it matters). First patch contribution, please let me know if I've not followed the right procedure!
Comment 2 Stefan Bodewig 2013-03-03 10:07:21 UTC
fixed with svn revision 1452023

Patrick, you've done everything the best way possible, many thanks.  It's just that we comitters are (more than just) a bit slow.