Search code examples
xsltxslt-2.0saxonrfc822xpath-2.0

Saxon XSLT 2.0 and RFC 822 date format


What is the right way to format xs:dateTime to RFC 822?


Solution

  • You need fn:format-dateTime

    I think it should be:

    format-dateTime(current-dateTime(),
                    '[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] [Z]',
                    'en',
                    '',
                    'US')
    

    Right now, for me, output:

    Thu, 07 Oct 2010 21:10:03 -03:00