Method: Periode#as_du_au
- Defined in:
- lib/clir/data_manager/Periode.rb
#as_du_au ⇒ Object
Returns un texte comme “de l’année 2021”.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/clir/data_manager/Periode.rb', line 204 def as_du_au @as_du_au ||= begin if debut_et_fin_de_semaine? "de la #{as_human}" elsif premier_jour_mois? if debut_et_fin_de_mois? "du mois d#{human_month.match?(/^[ao]/) ? '’' : 'e '}#{human_month} #{human_year}" elsif debut_et_fin_trimestre? "#{hindex_trimestre} trimestre #{human_year}" elsif debut_et_fin_annee? "de l’année #{human_year}" else "du #{human_period_jours}" end else "du #{human_period_jours}" end end end |