OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook] DocBook XSL Stylesheets v1.75.2 uses US date format


|  -----Original Message-----
|  From: Řyvind A. Holm
|
|  I just regenerated some documentation in a project of mine using the
|  DocBook XSL Stylesheets v1.75.2, and noticed that the 
|  generated date at
|  the man page is in the US date format:
|  
|      .\"      Date: 04/25/2010
|  
|  [...]
|  
|      .TH "GPST" "1" "04/25/2010" "[FIXME: source]" "[FIXME: manual]"
|  
|  This is ambiguous and prone to errors when the date is for example
|  "01/02/03". Is it 2003-02-01, 2003-01-02, or even 2001-02-03?
|  
|  The correct thing to do here, is to use the [international date
|  format][1], using yyyy-mm-dd instead of mm/dd/yy or dd/mm/yy.


Even though the default may not be to your liking, at least it is fairly
easy to customize the date format. The gentext machinery is described here:
http://www.sagehill.net/docbookxsl/CustomGentext.html.

The default "datetime" context in common/en.xml looks like this:

 <l:context name="datetime"><l:template name="format"
text="m/d/Y"/></l:context>

In your customization layer, replace "m/d/Y" with "Y-m-d".

Mauritz




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]