Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1b76be commit 8ebc0b9Copy full SHA for 8ebc0b9
1 file changed
cpp/ql/src/Likely Bugs/Leap Year/Adding365daysPerYear.qhelp
@@ -0,0 +1,20 @@
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>
0 commit comments