Skip to content

Commit 41e4de9

Browse files
authored
Merge pull request #239 from macrocosm-os/hotfix/fix-date-scoring
Hotfix Date Reward Scoring
2 parents 62a9a37 + 9ad590f commit 41e4de9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

prompting/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# DEALINGS IN THE SOFTWARE.
1717

1818
# Define the version of the template module.
19-
__version__ = "2.3.0"
19+
__version__ = "2.3.1"
2020
version_split = __version__.split(".")
2121
__spec_version__ = (
2222
(10000 * int(version_split[0]))

prompting/rewards/date.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def date_diff(self, ref_date: tuple, comp_date: tuple) -> int:
2828
# Extract the last 3-4 digits from the completion date using a regex pattern that would detect 3 or 4 digit years
2929
comp_year = re.findall(r'\b\d{3,4}\b', comp_date)
3030
if comp_year:
31-
return abs(int(ref_date) - int(comp_year[0])*365)
31+
return abs(int(ref_date) - int(comp_year[0]))*365
3232
else:
3333
return DATE_NOT_FOUND_CODE
3434
# If the reference date is not only a year, take the difference between the two dates

0 commit comments

Comments
 (0)