expirationTime 与 expireTime

作者:Kover 来源:ITPOW(原创) 日期:2007-1-11

对变量命名时,我常用英语单词命名,对英语单词我力求其正确、准确。日前在遇到“失效时间”时就遇到了障碍,我不知道是该用 expirationTime 还是 expireTime,搜索了很多用法,在 Microsoft 的 MSDN 下发现如下两段话:

ExpirationTime contains the expiration date and time of a notification as a SYSTEMTIME structure

ExpireTime contains the amount of elapsed time before article expirations begins.

expirationTime 用以表示失效的那个时间点,常用日期时间类型。

expireTime 用以表示离失效那个时间点还有多少时间,常用整型。

我发现我的“失效时间”该用 expirationTime,但我认为 expireTime 还可以用来表示其它意思,比如:已经失效了多少时间。

我的“生效时间”用的是 effectiveTime。

不知道我的用法与理解是否正确,写下来与大家共同探讨一下。

相关文章