eternaut commited on
Commit
49dd5e8
·
verified ·
1 Parent(s): 3fea317

Upload 01_TagesMuetter_RobertaBovoEdition.py

Browse files
src/01_TagesMuetter_RobertaBovoEdition.py CHANGED
@@ -78,7 +78,7 @@ st.markdown("""
78
  """, unsafe_allow_html=True)
79
 
80
  # Display the animated title
81
- st.markdown('<h2 class="animated-title">Roberta Bovo Special Edition 🤗 (ver. 4.2.2)</h2>', unsafe_allow_html=True)
82
  # --- End of Animated Title ---
83
 
84
  # Add vertical spacing to create better separation from file uploader
@@ -727,10 +727,10 @@ class trovaErrori:
727
  6. Provides options to download the error data and displays it in an interactive grid.
728
  7. Flags the erroneous records in the main DataFrame.
729
 
730
- --> #modificato in '04.09' il 24/6/2024 su richiesta RobertaB; modificato in '08.09' il 28/05/2026
731
 
732
  If child's birth date < KONTROLLEKINDERGARTEN_DATANASCITA_2,
733
- end date must not exceed a certain limit (08.09. of birth_year + 3).
734
 
735
  Raises:
736
  KeyError: If expected columns are missing from `self.df`.
@@ -762,14 +762,13 @@ class trovaErrori:
762
  # Condition: child born before this date
763
  older_kids = self.df[dob_col] < kontrolle_date
764
 
765
- # Step 2: Compute the acceptable contract end date ("08.09.{birth_year + 3}")
766
- # Extract birth year and compute birth_year + 3
767
- # Acceptable end date: 08.09.(birth_year + 3)
768
  birth_year_plus_3 = self.df[dob_col].dt.year + 3
769
 
770
- # Create date '08.09.YYYY'
771
  acceptance_date = pd.to_datetime(
772
- "08.09." + birth_year_plus_3.astype(str),
773
  format="%d.%m.%Y",
774
  errors="coerce",
775
  )
@@ -790,7 +789,7 @@ class trovaErrori:
790
 
791
  interface.make_expander(
792
  "errore Kindergarten",
793
- "Elenco dei bambini per cui è stato trovato l'errore secondo la condizione: dataFine > 08.09 dell'anno di nascita + 3 anni",
794
  num_errori,
795
  dftemp,
796
  )
 
78
  """, unsafe_allow_html=True)
79
 
80
  # Display the animated title
81
+ st.markdown('<h2 class="animated-title">Roberta Bovo Special Edition 🤗 (ver. 4.2.3)</h2>', unsafe_allow_html=True)
82
  # --- End of Animated Title ---
83
 
84
  # Add vertical spacing to create better separation from file uploader
 
727
  6. Provides options to download the error data and displays it in an interactive grid.
728
  7. Flags the erroneous records in the main DataFrame.
729
 
730
+ --> #modificato in '04.09' il 24/6/2024 su richiesta RobertaB; modificato in '08.09' solo per anno 2025 il 28/05/2026
731
 
732
  If child's birth date < KONTROLLEKINDERGARTEN_DATANASCITA_2,
733
+ end date must not exceed a certain limit (04.09. of birth_year + 3, or 08.09 for year 2025).
734
 
735
  Raises:
736
  KeyError: If expected columns are missing from `self.df`.
 
762
  # Condition: child born before this date
763
  older_kids = self.df[dob_col] < kontrolle_date
764
 
765
+ # Step 2: Compute the acceptable contract end date ("{end_md}.{birth_year + 3}")
766
+ # 08.09 only for 2025; 04.09 for all other years
767
+ end_md = "08.09" if self.ANNO_RIFERIMENTO == "2025" else "04.09"
768
  birth_year_plus_3 = self.df[dob_col].dt.year + 3
769
 
 
770
  acceptance_date = pd.to_datetime(
771
+ end_md + "." + birth_year_plus_3.astype(str),
772
  format="%d.%m.%Y",
773
  errors="coerce",
774
  )
 
789
 
790
  interface.make_expander(
791
  "errore Kindergarten",
792
+ f"Elenco dei bambini per cui è stato trovato l'errore secondo la condizione: dataFine > {end_md} dell'anno di nascita + 3 anni",
793
  num_errori,
794
  dftemp,
795
  )