CPP: Add basic .qhelp for Adding365daysPerYear.ql.

This commit is contained in:
Geoffrey White
2019-06-14 14:21:08 +01:00
parent f1b76be57f
commit 8ebc0b9c39

View File

@@ -0,0 +1,20 @@
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<include src="LeapYear.qhelp" />
<p>When performing arithmetic operations on a variable that represents a date, leap years must be taken into account.
It is not safe to assume that a year is 365 days long.</p>
</overview>
<recommendation>
<p>Determine whether the time span in question contains a leap day, then perform the calculation using the correct number
of days. Alternatively, use an established library routine that already contains correct leap year logic.</p>
</recommendation>
<references>
<include src="LeapYearReferences.qhelp" />
</references>
</qhelp>