私はC++のwin32 APIを使用しています...
私はこれらの値を持っています。
pwdlastset 日付 (例: 25-9-2012)、現在の日付 (例: 1-11-2012)、maxpwdage カウント (例: 54 日) pwdwarningdays (14 日)...
今、私はパスワードの有効期限を計算したい...
私は以下のコードを試しました...
if(lastpwdchmon==currentMonth)
{
lCount=currentDay-lastpwdchday;
}
else if(lastpwdchmon<currentMonth)
{
lCount=((currentDay+30)-lastpwdchday);
}
しかし、私には問題があります...
つまり、現在の日付と pwdlastset の日付の間の日数を計算する必要がありますか?
これを達成する方法は?