diff --git a/prompting/__init__.py b/prompting/__init__.py index fb670e33e..476009f42 100644 --- a/prompting/__init__.py +++ b/prompting/__init__.py @@ -16,7 +16,7 @@ # DEALINGS IN THE SOFTWARE. # Define the version of the template module. -__version__ = "2.3.0" +__version__ = "2.3.1" version_split = __version__.split(".") __spec_version__ = ( (10000 * int(version_split[0])) diff --git a/prompting/rewards/date.py b/prompting/rewards/date.py index 9cc3bf525..9fcb5bc1e 100644 --- a/prompting/rewards/date.py +++ b/prompting/rewards/date.py @@ -28,7 +28,7 @@ def date_diff(self, ref_date: tuple, comp_date: tuple) -> int: # Extract the last 3-4 digits from the completion date using a regex pattern that would detect 3 or 4 digit years comp_year = re.findall(r'\b\d{3,4}\b', comp_date) if comp_year: - return abs(int(ref_date) - int(comp_year[0])*365) + return abs(int(ref_date) - int(comp_year[0]))*365 else: return DATE_NOT_FOUND_CODE # If the reference date is not only a year, take the difference between the two dates