我需要在XSLT 1.0中将当前日期与开始日期和结束日期进行比较。任何人都可以帮忙吗?
以下是一个示例:我需要确定2017-02-15是否在2017-02-14和2017-02-16之间。
答案 0 :(得分:1)
您无法比较日期,但可以在删除 // Find Table Web Element
WebElement tableEle = driver.findElement(By.xpath("\\div[@class='ui-grid-canvas']")
// Using Table WebElement find the list of Rows
List<WebElement> tableRows = tableEle.findElements(By.xpath("\\div[@ui-grid-row='row']"))
//Loop through each Row
for(int rnum=0;rnum<tableRows.size();rnum++)
{
//Get the Columns for each row
List<WebElement> tableColumns=tableRows.get(rnum).findElements(By.xpath("div[@role='gridcell']\div"));
count=0;
//loop through each column
for(int cnum=0;cnum<tableColumns.size();cnum++)
{
//verify the each column value with req values array , if matches increase the count otherwise come out of columns for loop
if((columns.get(cnum).getText()).equalsIgnoreCase(ReqValues[cnum]))
{
count++;
}
else
{
break;
}
// count is equal to column size -1 then matched all records click on the last column where edit icon exist and come out of rows for loop
if(count ==( tableColumns.size()-1))
{
columns.get((tableColumns.size())-1).click();
break;
}
}
}
分隔符后将它们作为数字进行比较,例如:
-