myPIM

Check-in [9f712e6718]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correctly normalize base to 1 before comparing week spans
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:9f712e6718e180c1cf929e898ba43715932138cd3f5f803e3c42a50633bfc169
User & Date: ajv-899-334-8894@vsta.org 2011-10-28 21:58:19
Context
2011-10-28
21:58
Add Bastille day for Mom check-in: 474b749d79 user: ajv-899-334-8894@vsta.org tags: master, trunk
21:58
Correctly normalize base to 1 before comparing week spans check-in: 9f712e6718 user: ajv-899-334-8894@vsta.org tags: master, trunk
21:57
*** empty log message *** check-in: e4515f536c user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pimtime.py.

101
102
103
104
105
106
107
108






109
110
111
112
113
114
115
	if self.rept == 3:
	    return e.d == date.d

	# Monthly on nth occurrence of this day of week
	if self.rept == 4:
	    if e.weekday() <> date.weekday():
		return False
	    return (e.d / 7) == (date.d / 7)







	# Yearly; must match month
	if e.m <> date.m:
	    return False

	# Yearly on nth day of week in this month,
	#  counting from end







|
>
>
>
>
>
>







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
	if self.rept == 3:
	    return e.d == date.d

	# Monthly on nth occurrence of this day of week
	if self.rept == 4:
	    if e.weekday() <> date.weekday():
		return False
	    d1 = e.d
	    assert (d1 > 0) and (d1 < 32)
	    d1 -= 1
	    d2 = date.d
	    assert (d2 > 0) and (d2 < 32)
	    d2 -= 1
	    return (d1/7) == (d2/7)

	# Yearly; must match month
	if e.m <> date.m:
	    return False

	# Yearly on nth day of week in this month,
	#  counting from end