xsl-list
[Top] [All Lists]

RE: RE: another error in date:difference template ...

2004-07-09 09:22:46
Hi Harry and Jeni:

I modified the date:difference template to get the test
harness to pass.

It now uses a julian-date calculation to establish
the diff-days.

I haven't tested using other date-time formats.

The following is the results from instant-saxon:
saxon dummy.xml date-diff-test.xsl
<?xml version="1.0" encoding="UTF-8"?>

        pass: 2004-02-26 + P2D           = 2004-02-28 [2004-02-28]
        pass: 2004-02-28 + P2D           = 2004-03-01 [2004-03-01]
        pass: 2003-02-26 + P2D           = 2003-02-28 [2003-02-28]
        pass: 2003-02-28 + P1D           = 2003-03-01 [2003-03-01]
        pass: 2002-12-30 + P2D           = 2003-01-01 [2003-01-01]
        pass: 2002-12-30 + P61D          = 2003-03-01 [2003-03-01]
        pass: 2000-12-30 + P2D           = 2001-01-01 [2001-01-01]
        pass: 2000-02-28 + P308D         = 2001-01-01 [2001-01-01]
        pass: 2003-12-30 + P2D           = 2004-01-01 [2004-01-01]
        pass: 2003-12-30 + P62D          = 2004-03-01 [2004-03-01]
        pass: 2000-12-30 + P1097D        = 2004-01-01 [2004-01-01]
        pass: 2000-12-30 + P1157D        = 2004-03-01 [2004-03-01]
        pass: 2000-02-28 + P1463D        = 2004-03-01 [2004-03-01]
        pass: 2004-03-01 + -P1463D       = 2000-02-28 [2000-02-28]

Jenni:

I hope you will consider accepting this contribution.

Thanks,
-- Tom.

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 7/5/2004
 
    

This e-mail or the documents accompanying this e-mail contain
information that may be confidential and/or privileged. It may
also be prohibited from disclosure under applicable law. The
information is intended to be for the use of the individual or
entity named on this transmission. If you are not the intended
recipient, be aware that any disclosure, copying, distribution
or use of the contents of this information is without
authorization and is prohibited. If you have received this
e-mail in error, please notify us immediately so that we can
take action to correct the problem.

Attachment: date.difference.template.xsl
Description: date.difference.template.xsl

Attachment: date-diff-test.xsl
Description: date-diff-test.xsl

_______________________________________________
exslt mailing list
list(_at_)exslt(_dot_)org
http://www.exslt.org/list