File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
cpp/ql/src/Likely Bugs/Leap Year Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE qhelp PUBLIC
2+ "-//Semmle//qhelp//EN"
3+ "qhelp.dtd">
4+ <qhelp >
5+ <overview >
6+ <include src =" LeapYear.qhelp" />
7+
8+ <p >When performing arithmetic operations on a variable that represents a date, leap years must be taken into account.
9+ It is not safe to assume that a year is 365 days long.</p >
10+ </overview >
11+
12+ <recommendation >
13+ <p >Determine whether the time span in question contains a leap day, then perform the calculation using the correct number
14+ of days. Alternatively, use an established library routine that already contains correct leap year logic.</p >
15+ </recommendation >
16+
17+ <references >
18+ <include src =" LeapYearReferences.qhelp" />
19+ </references >
20+ </qhelp >
You can’t perform that action at this time.
0 commit comments