xslt - subtracting days

前端 未结 5 1910
醉话见心
醉话见心 2020-12-15 09:26

Is it possible with xslt to take a date field and subtract N number of days from it? If so, can you please provide me an example?

5条回答
  •  北海茫月
    2020-12-15 10:08

    Yes, with XSLT 2.0 it is possible, and very easy to do.

    There are a lot of Date/Time/Duration functions in XPATH 2.0, which are part of XSLT 2.0.

    This example subtracts 1 day from the date 2010-01-01 to produce 2009-12-31:

    
    
    
      
    
    
    

提交回复
热议问题