Sha256: 570c801e456ef8f05a0529e71eb285c3833c8ede0c63273ff4c3adae1ae37acf
Contents?: true
Size: 725 Bytes
Versions: 2
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true module Edtf module Humanize module Language module French include Default module Century extend self def humanizer(date) require 'roman' "#{((date.year.abs / 100) + 1).to_roman}" \ "#{century_number_suffix(date)}" \ "#{century_sign_suffix(date)}" end private def century_number_suffix(date) return 'er siècle' if (date.year.abs / 100).zero? 'e siècle' end def century_sign_suffix(date) return ' avant J.C.' if date.year.negative? '' end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
edtf-humanize-2.3.0 | lib/edtf/humanize/language/french.rb |
edtf-humanize-2.2.0 | lib/edtf/humanize/language/french.rb |