Processor - date util code

Code

lambdas.date_util.get_datetime_string(date_str, time_str)[source]

This method is used to get date time format :param date_str: :param time_str:

lambdas.date_util.is_mask_date_in_expected_format(mask_date, time_str)[source]

This method is used to check masking date expected format :param mask_date: masking date :param time_str: time :return : True or False

lambdas.date_util.get_verified_cap_date_format(cap_date)[source]

This method is used to check capping date expected format :param cap_date: capping date :return : True or False

lambdas.date_util.get_verified_cap_date(cap_date)[source]

This method is used to check capping date should be greater than today’s date :param cap_date: capping date :return :

lambdas.date_util.add_end_daytime(cap_date)[source]

This method is used to add end time to capping date :param cap_date: capping date :return :

lambdas.date_util.add_start_daytime(cap_date)[source]

This method is used to add start time to capping date :param cap_date: capping date :return :

lambdas.date_util.is_valid_masking_date(mask_date)[source]

This method is used to check masking date should be greater than today’s date :param mask_date: masking date :return :

lambdas.date_util.validate_store(store_id)[source]

This method is used to verify the store id is valid or not :param store_id: store id :return : True if valid store_id

lambdas.date_util.is_validate_store_id(stores)[source]

This method is used to verify the store id is valid or not :param stores: list of store id :return : True if all valid store_ids in list

lambdas.date_util.get_updated_product_masking_for_overlapping(masking_data)[source]

This method is used to get updated masking if new masking overlapped with existing masking :param masking_data: Override Periods Details

lambdas.date_util.is_mask_date_overlapping(existing_mask_from, existing_mask_until, new_mask_from, new_mask_until)[source]

This method is used for finding the overlapping masking dates :param existing_mask_from: :param existing_mask_until: :param new_mask_from: :param new_mask_until: :return:

lambdas.date_util.is_more_than_one_year(new_mask_from, new_mask_until, date_format)[source]

This method is used for finding the masking dates is more than one year or not :param new_mask_from: masking from date :param new_mask_until: masking until date :param date_format: date format :return:

lambdas.date_util.validate_if_masking_is_more_than_a_year(from_date, to_date, override_from_date, is_delete)[source]

Function to check if masking difference is more than a year. params: from_date: from date to_date: until date override_from_date: new suggested from date is_delete: True or False