示例#1
0
    def update_pending(self, serfile: SerfFile, date_str) -> bool:
        """
        Check if there's an update for the SerfFile by comparing the date stored
        with the input date.
        ----------
        serfile : SerfFile
            DESCRIPTION.
        date_str : TYPE
            DESCRIPTION.

        Returns
        -------
        bool
            DESCRIPTION.

        """
        self.__check_standard_date(date_str)
        input_date = standard_date(date_str)

        dict_str = str(serfile.data_dict)
        if dict_str in self.files_dict:
            date_str = self.files_dict[dict_str]
            current_date = standard_date(date_str)
            return (current_date > input_date)

        else:
            return True
示例#2
0
 def __set_submission_date(self):
     dates_data = pd.read_csv('serf_submission_dates.txt')
     start_date_str = dates_data['Start Date'][0]
     self.start_date = standard_date(start_date_str)
示例#3
0
 def __after_startdate(self, date_filed_str: str) -> bool:
     date_filed = standard_date(date_filed_str)
     time.sleep(0.1)
     print('date filed:', date_filed, 'submission date', self.start_date)
     return date_filed >= self.start_date