Date operations on xsl 1.0

后端 未结 2 1096
我在风中等你
我在风中等你 2020-11-28 15:25

I need to get 3 days before and after a given date defined in a variable, and store each one of them in a new individual variable in xsl 1.0. i can\'t use any extensions or

2条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 16:13

    Adding/subtracting number of days to/from date in pure XSLT 1.0:

    
    
    
    
    
    
    
        
            
        
    
    
    
        
            
        
    
    
    
    
        
            
            
        
     
    
    
    
        
        
        
        
        
        
        
        
     
    
    
        
        
        
        
        
        
        
        
        
        
        
         
    
    
    

    Result:

    
    
       2014-05-13T00:00:00
       2014-05-10
    
    

    --
    Note that the givenDate's parameter value is a string and as such must be wrapped in single quotes.

提交回复
热议问题