[英]Is it possible to find all date calculations in a project?
I'm trying to locate possible daylight savings issues in a huge system.我试图在一个巨大的系统中找到可能存在的夏令时问题。
Is it possible to locate all date calculations using some kind of analysis tool?是否可以使用某种分析工具定位所有日期计算?
By date calculations I mean operator +, operator -, operator <, operator <= etc for DateTime variables.对于日期计算,我指的是日期时间变量的运算符 +、运算符 -、运算符 <、运算符 <= 等。 Searching for datetime references and then searching for all uses of those variables is not a feasible way.
搜索日期时间引用,然后搜索这些变量的所有用途并不是一种可行的方法。 The system is way too large.
系统太大了。
It is possible search +,-,* operator using ReSharper tool on specific data types.可以在特定数据类型上使用 ReSharper 工具搜索 +,-,* 运算符。
Eg *(double parameter, double parameter):double
is the search criteria it uses to search * operation between double variables.例如
*(double parameter, double parameter):double
是它用于在 double 变量之间搜索 * 操作的搜索条件。
You just need to right click on * on the variable double a = c*d;
您只需要右键单击变量
double a = c*d;
and say find usage, ReSharper will do the rest.并说找到用法,ReSharper 将完成剩下的工作。
But I am not sure how you are doing date manipulation using +,- etc...但我不确定您是如何使用 +、- 等进行日期操作的...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.